-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql-practice-1.com.json
More file actions
21 lines (21 loc) · 8.16 KB
/
sql-practice-1.com.json
File metadata and controls
21 lines (21 loc) · 8.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{"showTimer":false,"isDarkMode":true,"disableAds":true,"questionsSolved":[{"id":0,"skipped":false,"userSolution":"select first_name, last_name, gender\nfrom patients \nwhere gender = \"M\";","hints":1,"solvedTime":168014,"completedWithoutSkipping":true},
{"id":1,"skipped":false,"userSolution":"select first_name, last_name\nfrom patients\nwhere allergies is NUll;","hints":1,"solvedTime":65005,"completedWithoutSkipping":true},
{"id":2,"skipped":false,"userSolution":"select first_name\nfrom patients\nwhere first_name like \"C%\";","hints":1,"solvedTime":43005,"completedWithoutSkipping":true},
{"id":3,"skipped":false,"userSolution":"select first_name, last_name\nfrom patients\nwhere weight between 100 and 120;","hints":1,"solvedTime":76010,"completedWithoutSkipping":true},
{"id":4,"skipped":false,"userSolution":"SELECT * FROM patients;\n\nselect first_name, last_name, gender\nfrom patients \nwhere gender = \"M\";\n\nselect first_name, last_name\nfrom patients\nwhere allergies is NUll;\n\nselect first_name\nfrom patients\nwhere first_name like \"C%\";\n\nselect first_name, last_name\nfrom patients\nwhere weight between 100 and 120;\n\nupdate patients\nset allergies = \"NKA\"\nwhere allergies is null","hints":1,"solvedTime":49006,"completedWithoutSkipping":true},
{"id":5,"skipped":false,"userSolution":"select concat(first_name, \" \",last_name) as full_name\nfrom patients;","hints":1,"solvedTime":52008,"completedWithoutSkipping":true},
{"id":6,"skipped":false,"userSolution":"select first_name, last_name, pr.province_name\nfrom patients\njoin province_names pr on pr.province_id = patients.province_id;","hints":1,"solvedTime":72995,"completedWithoutSkipping":true},
{"id":23,"skipped":false,"userSolution":"select count(*) as birth_year\nfrom patients\nwhere year(birth_date) = 2010;","hints":1,"solvedTime":83009,"completedWithoutSkipping":true},
{"id":33,"skipped":false,"userSolution":"select first_name, last_name, max(height)\nfrom patients;","hints":1,"solvedTime":80008,"completedWithoutSkipping":true},
{"id":34,"skipped":false,"userSolution":"select * from patients\nwhere patient_id in (1,45,534,879,1000);","hints":1,"solvedTime":89012,"completedWithoutSkipping":true},
{"id":35,"skipped":false,"userSolution":"select count(*) as total_admission\nfrom admissions;","hints":1,"solvedTime":83007,"completedWithoutSkipping":true},
{"id":41,"skipped":false,"userSolution":"select * from admissions\nwhere admission_date = discharge_date;","hints":1,"solvedTime":114006,"completedWithoutSkipping":true},
{"id":42,"skipped":false,"userSolution":"select patient_id, count(*) number_of_admission\nfrom admissions\nwhere patient_id = 579;","hints":1,"solvedTime":278021,"completedWithoutSkipping":true},
{"id":32,"skipped":false,"userSolution":"select distinct city from patients\nwhere province_id = \"NS\";","hints":1,"solvedTime":81012,"completedWithoutSkipping":true},
{"id":45,"skipped":false,"userSolution":"select first_name, last_name, birth_date\nfrom patients\nwhere height > 160\nand weight > 70;","hints":1,"solvedTime":95001,"completedWithoutSkipping":true},
{"id":46,"skipped":false,"userSolution":"select first_name, last_name, allergies\nfrom patients\nwhere allergies is not null and city = \"Hamilton\";","hints":1,"solvedTime":82010,"completedWithoutSkipping":true},
{"id":7,"skipped":false,"userSolution":"select distinct year(birth_date) as birth_year\nfrom patients\norder by birth_year;","hints":1,"solvedTime":118004,"completedWithoutSkipping":true},
{"id":8,"skipped":true,"userSolution":"SELECT * FROM patients;\n\nselect first_name, last_name, gender\nfrom patients \nwhere gender = \"M\";\n\n\nselect first_name, last_name\nfrom patients\nwhere allergies is NUll;\n\n\nselect first_name\nfrom patients\nwhere first_name like \"C%\";\n\n\nselect first_name, last_name\nfrom patients\nwhere weight between 100 and 120;\n\n\nupdate patients\nset allergies = \"NKA\"\nwhere allergies is null;\n\nselect concat(first_name, \" \",last_name) as full_name\nfrom patients;\n\n\nselect first_name, last_name, pr.province_name\nfrom patients\njoin province_names pr on pr.province_id = patients.province_id;\n\n\nselect count(*) as birth_year\nfrom patients\nwhere year(birth_date) = 2010;\n\nselect first_name, last_name, max(height)\nfrom patients;\n\n\nselect * from patients\nwhere patient_id in (1,45,534,879,1000);\n\n\nselect count(*) as total_admission\nfrom admissions;\n\nselect * from admissions\nwhere admission_date = discharge_date;\n\nselect patient_id, count(*) number_of_admission\nfrom admissions\nwhere patient_id = 579;\n\nselect distinct city from patients\nwhere province_id = \"NS\";\n\nselect first_name, last_name, birth_date\nfrom patients\nwhere height > 160 and weight > 70;\n\n\nselect first_name, last_name, allergies\nfrom patients\nwhere allergies is not null and city = \"Hamilton\";\n\n\n/* MEDUIM TASKS */\nselect distinct year(birth_date) as birth_year\nfrom patients\norder by birth_year;\n\nselect first_name, count(*) as appearance\nfrom patients\ngroup by first_name\nhaving appearance = 1;\n"},
{"id":9,"skipped":false,"userSolution":"select patient_id, first_name\nfrom patients\nwhere length(first_name) >= 6 and first_name like \"S%S\";","hints":2,"solvedTime":344002,"completedWithoutSkipping":true},
{"id":10,"skipped":false,"userSolution":"select patients.patient_id, first_name, last_name\nfrom patients\njoin admissions ad On ad.patient_id = patients.patient_id\nwhere ad.diagnosis = \"Dementia\";","hints":1,"solvedTime":145008,"completedWithoutSkipping":true},
{"id":11,"skipped":false,"userSolution":"select first_name from patients\norder by len(first_name), first_name;","hints":2,"solvedTime":458007,"completedWithoutSkipping":true}],"autoRun":true,"autocomplete":true,"editorFontSize":14,"persistEditorText":false,"editorText":"SELECT * FROM patients;\n\nselect first_name, last_name, gender\nfrom patients \nwhere gender = \"M\";\n\n\nselect first_name, last_name\nfrom patients\nwhere allergies is NUll;\n\n\nselect first_name\nfrom patients\nwhere first_name like \"C%\";\n\n\nselect first_name, last_name\nfrom patients\nwhere weight between 100 and 120;\n\n\nupdate patients\nset allergies = \"NKA\"\nwhere allergies is null;\n\nselect concat(first_name, \" \",last_name) as full_name\nfrom patients;\n\n\nselect first_name, last_name, pr.province_name\nfrom patients\njoin province_names pr on pr.province_id = patients.province_id;\n\n\nselect count(*) as birth_year\nfrom patients\nwhere year(birth_date) = 2010;\n\nselect first_name, last_name, max(height)\nfrom patients;\n\n\nselect * from patients\nwhere patient_id in (1,45,534,879,1000);\n\n\nselect count(*) as total_admission\nfrom admissions;\n\nselect * from admissions\nwhere admission_date = discharge_date;\n\nselect patient_id, count(*) number_of_admission\nfrom admissions\nwhere patient_id = 579;\n\nselect distinct city from patients\nwhere province_id = \"NS\";\n\nselect first_name, last_name, birth_date\nfrom patients\nwhere height > 160 and weight > 70;\n\n\nselect first_name, last_name, allergies\nfrom patients\nwhere allergies is not null and city = \"Hamilton\";\n\n\n/* MEDUIM TASKS */\nselect distinct year(birth_date) as birth_year\nfrom patients\norder by birth_year;\n\nselect first_name\nfrom patients\ngroup by first_name\nhaving count(first_name) = 1;\n\nselect patient_id, first_name\nfrom patients\nwhere length(first_name) >= 6 and first_name like \"S%S\";\n\nselect patients.patient_id, first_name, last_name\nfrom patients\njoin admissions ad On ad.patient_id = patients.patient_id\nwhere ad.diagnosis = \"Dementia\";\n\nselect first_name from patients\norder by len(first_name), first_name;\n\n","queryTimes":[{"id":0,"time":168014},{"id":1,"time":65005},{"id":2,"time":43005},{"id":3,"time":76010},{"id":4,"time":49006},{"id":5,"time":52008},{"id":6,"time":72995},{"id":23,"time":83009},{"id":33,"time":80008},{"id":34,"time":89012},{"id":35,"time":83007},{"id":41,"time":114006},{"id":42,"time":278021},{"id":32,"time":81012},{"id":45,"time":95001},{"id":46,"time":82010},{"id":7,"time":118004},{"id":8,"time":355005},{"id":9,"time":344002},{"id":10,"time":145008},{"id":11,"time":458007},{"id":12,"time":192005}],"filterState":{"selectedKeywordFilter":"ALL","selectedDifficultyFilter":"ALL","selectedCompletedFilter":"ALL","selectedDatabaseFilter":"Hospital"}}