Search This Blog

1. Examination Data

1. Examination Data

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
NameTypeDescription
NAMESTRINGThis is the student name. It is the primary key.
MARKSINTEGERThese are the marks obtained.

Sample Data Tables
exam
NAMEMARKS
Julia10
Samantha6
Jack15


 

Sample Output

JULIA 10
SAMANTHA 6

Explanation

  • Julia and Samantha have an even number of marks, so they are included in the query.



ANSWER:


/*
Enter your query below.
Please append a semicolon ";" at the end of the query
*/
select UPPER(NAME), MARKS from EXAM
where MARKS%2 = 0
order by NAME ASC;












No comments:

Post a Comment

If you have any doubts, Please let us know.