Write a query to display student ID, First name and age. Sort the result based on student ID.
[Note : Age can be calculated using DOB and give alias name as age]
Answers
Answered by
6
Answer:
I was thinking you can have a table B in which you can get the top marks alone and match it with the names in the student table A. But turns out my "groupby" is wrong.
One more variation of the question which I felt was can be asked is that, if there is more than one student having the highest mark in a subject, even their names should be included.
Answered by
0
In order to display student ID, First name and age from a table we need SQL(Structured query language) from DATABASE MANAGEMENT SYSTEM.
The command will be like :-
select Student_ID, First_Name, Age from <Table name>
It will display all the records from the fields that are asked to be displayed. Select is a clause which selects fields and all the records from a table.
#SPJ3
Similar questions