I have a problem to come up with query. Scenario is: To produce a list showing the name and age(in years) of child on the day that the query is run. The list should be stored in descending order of age(i.e. oldest children first) with children of the same age listed alphabetically by surname, first name. TABLE STRUCTURE:
CHILD TABLE
( child_id[Primary Key],
child_fame,
child_sname,
child_gender,
child_dob)
-
child_id_1=07/02/1999
-
child_id_2=13/11/2002
-
child-id_3=13/11/2002
-
child_id_4=26/10/1999
-
child_id_5=04/05/2004 etc…
This should do it: