MegaSoft (Egypt) Interview Question

sql queries and grouping ,sorting