-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExamination Data
More file actions
42 lines (30 loc) · 812 Bytes
/
Examination Data
File metadata and controls
42 lines (30 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
There is a database with exam scores. Write a query to print the names of the students who scored an even number of marks. The names should be listed in uppercase, alphabetically ascending. The result should be in the following format: NAME MARKS
Schema
There is 1 table: exam
exam
Name Type Description
NAME STRING This is the student name. It is the primary key.
MARKS INTEGER These are the marks obtained.
Sample Data Tables
exam
NAME MARKS
Julia 10
Samantha 6
Jack 15
Sample Output
JULIA 10
SAMANTHA 6
Explanation
Julia and Samantha have an even number of marks, so they are included in the query.
Test Results
Run Query
Submit
/*
Enter your query below.
Please append a semicolon ";" at the end of the query
*/
//CODE
SELECT upper(name), marks
FROM exam
WHERE marks % 2 = 0
ORDER BY name ASC;