Show all students:
SQL is done successfully.
SQL is done successfully.
idfirstnamelastnameemailage
1MichaelJordanmjordan@ggc.edu26
2LieuPhamlpham@ggc.edu23
3AndyNolananolan@ggc.edu36
4KeyairaBrownkbrown@ggc.edu13
5PennyBucketpbucket@ggc.edu54
6PatrickStarpstar@ggc.edu19
7SelenaGomezsgomez@ggc.edu35
8DemiLovatodlovato@ggc.edu19
9JadenNguyenjnguyen@ggc.edu13
10VyvianDovdo@ggc.edu58
11JustinMcCabejmmcabe@ggc.edu53
12MandyCunninghammcunningham@ggc.edu92
13DanielDonddon@ggc.edu1
14MikeGeorgemgeorge@ggc.edu28
23MikeTysonmtyson@ggc.edu37
24PatrickGomezpgomez@ggc.edu2
Total rows: 16
Change all students' age to 21:
SQL is done successfully.
SQL is done successfully.
idfirstnamelastnameemailage
1MichaelJordanmjordan@ggc.edu21
2LieuPhamlpham@ggc.edu21
3AndyNolananolan@ggc.edu21
4KeyairaBrownkbrown@ggc.edu21
5PennyBucketpbucket@ggc.edu21
6PatrickStarpstar@ggc.edu21
7SelenaGomezsgomez@ggc.edu21
8DemiLovatodlovato@ggc.edu21
9JadenNguyenjnguyen@ggc.edu21
10VyvianDovdo@ggc.edu21
11JustinMcCabejmmcabe@ggc.edu21
12MandyCunninghammcunningham@ggc.edu21
13DanielDonddon@ggc.edu21
14MikeGeorgemgeorge@ggc.edu21
23MikeTysonmtyson@ggc.edu21
24PatrickGomezpgomez@ggc.edu21
Total rows: 16
Change a few students' age to be 19:
SQL is done successfully.
SQL is done successfully.
idfirstnamelastnameemailage
1MichaelJordanmjordan@ggc.edu21
2LieuPhamlpham@ggc.edu21
3AndyNolananolan@ggc.edu21
4KeyairaBrownkbrown@ggc.edu21
5PennyBucketpbucket@ggc.edu21
6PatrickStarpstar@ggc.edu19
7SelenaGomezsgomez@ggc.edu21
8DemiLovatodlovato@ggc.edu19
9JadenNguyenjnguyen@ggc.edu21
10VyvianDovdo@ggc.edu21
11JustinMcCabejmmcabe@ggc.edu21
12MandyCunninghammcunningham@ggc.edu21
13DanielDonddon@ggc.edu21
14MikeGeorgemgeorge@ggc.edu21
23MikeTysonmtyson@ggc.edu21
24PatrickGomezpgomez@ggc.edu21
Total rows: 16
Change all students' age to a random number between (1,100):
SQL is done successfully.
SQL is done successfully.
idfirstnamelastnameemailage
1MichaelJordanmjordan@ggc.edu79
2LieuPhamlpham@ggc.edu19
3AndyNolananolan@ggc.edu56
4KeyairaBrownkbrown@ggc.edu26
5PennyBucketpbucket@ggc.edu61
6PatrickStarpstar@ggc.edu19
7SelenaGomezsgomez@ggc.edu28
8DemiLovatodlovato@ggc.edu19
9JadenNguyenjnguyen@ggc.edu56
10VyvianDovdo@ggc.edu94
11JustinMcCabejmmcabe@ggc.edu5
12MandyCunninghammcunningham@ggc.edu41
13DanielDonddon@ggc.edu91
14MikeGeorgemgeorge@ggc.edu35
23MikeTysonmtyson@ggc.edu1
24PatrickGomezpgomez@ggc.edu97
Total rows: 16
Find the total number of students:
SQL is done successfully.
Total # of students
16
Total rows: 1
Find the total number of students who are 40+ years old:
SQL is done successfully.
Total # of students who are 40+ years old
8
Total rows: 1
Find the average age of all students:
SQL is done successfully.
Average age of all students
45.4375
Total rows: 1
Find the youngest and oldest student:
SQL is done successfully.
Oldest age of all studentsYoungest age of all students
971
Total rows: 1
Sort in ascending order by lastname for all students:
SQL is done successfully.
idfirstnamelastnameemailage
4KeyairaBrownkbrown@ggc.edu26
5PennyBucketpbucket@ggc.edu61
12MandyCunninghammcunningham@ggc.edu41
10VyvianDovdo@ggc.edu94
13DanielDonddon@ggc.edu91
14MikeGeorgemgeorge@ggc.edu35
24PatrickGomezpgomez@ggc.edu97
7SelenaGomezsgomez@ggc.edu28
1MichaelJordanmjordan@ggc.edu79
8DemiLovatodlovato@ggc.edu19
11JustinMcCabejmmcabe@ggc.edu5
9JadenNguyenjnguyen@ggc.edu56
3AndyNolananolan@ggc.edu56
2LieuPhamlpham@ggc.edu19
6PatrickStarpstar@ggc.edu19
23MikeTysonmtyson@ggc.edu1
Total rows: 16
Sort in descending order by lastname for students whose firstname is Mike:
SQL is done successfully.
idfirstnamelastnameemailage
23MikeTysonmtyson@ggc.edu1
14MikeGeorgemgeorge@ggc.edu35
Total rows: 2
Find how many Mike are there:
SQL is done successfully.
# of people whose name is Mike
2
Total rows: 1
Find how many people having the same name and sort in descending order by number of people
SQL is done successfully.
firstnameNo_of_People_with_this_name
Patrick2
Mike2
Lieu1
Keyaira1
Demi1
Vyvian1
Mandy1
Michael1
Andy1
Penny1
Selena1
Jaden1
Justin1
Daniel1
Total rows: 14
Find the youngest student:
SQL is done successfully.
idfirstnamelastnameage
23MikeTyson1
Total rows: 1
Find the oldest student:
SQL is done successfully.
idfirstnamelastnameage
24PatrickGomez97
Total rows: 1
Find all the students who are older than the average age:
SQL is done successfully.
idfirstnamelastnameage
1MichaelJordan79
3AndyNolan56
5PennyBucket61
9JadenNguyen56
10VyvianDo94
13DanielDon91
24PatrickGomez97
Total rows: 7