SQL refresher WiC 

   
   

Output:

(4 rows affected)
id          name                           major                          year        NumCredits 
----------- ------------------------------ ------------------------------ ----------- -----------
          1 mahi                           computer science                         4        NULL
          2 emma                           IIT                                      2        NULL
          3 carolina                       computer information systems             3        NULL
          4 lea                            business                                 1        NULL

(4 rows affected)
name                           year       
------------------------------ -----------
mahi                                     4
emma                                     2
carolina                                 3
lea                                      1

(4 rows affected)
name                           year       
------------------------------ -----------
lea                                      1
emma                                     2
carolina                                 3
mahi                                     4

(4 rows affected)
name                           year       
------------------------------ -----------
mahi                                     4
carolina                                 3
emma                                     2
lea                                      1

(4 rows affected)
student_name                  
------------------------------
mahi                          
emma                          
carolina                      
lea                           

(4 rows affected)
name                          
------------------------------
mahi                          

(1 rows affected)
name                          
------------------------------
emma                          
carolina                      
lea                           

(3 rows affected)
name                          
------------------------------
mahi                          
emma                          
carolina                      

(3 rows affected)
id          name                           major                          year        NumCredits 
----------- ------------------------------ ------------------------------ ----------- -----------
          1 mahi                           computer science                         4        NULL
          2 emma                           IIT                                      2        NULL
          3 carolina                       computer information systems             3        NULL
          4 lea                            business                                 1        NULL

(4 rows affected)
name                          
------------------------------
carolina                      

(1 rows affected)
name                          
------------------------------
lea                           

(1 rows affected)

(1 rows affected)
id          name                           major                          year        NumCredits 
----------- ------------------------------ ------------------------------ ----------- -----------
          1 mahi                           computer science                         4        NULL
          2 emma                           IIT                                      2        NULL
          3 carolina                       computer information systems             3        NULL
          4 lea                            business                                 1        NULL
          5 max                            biology                                  2          50

(5 rows affected)
name                          
------------------------------
emma                          
carolina                      
lea                           
max                           

(4 rows affected)
name                          
------------------------------
max                           

(1 rows affected)
name                          
------------------------------
mahi                          
emma                          
carolina                      
lea                           

(4 rows affected)
name                          
------------------------------
emma                          
carolina                      
lea                           

(3 rows affected)
major                         
------------------------------
biology                       
business                      
computer information systems  
computer science              
IIT                           

(5 rows affected)
Num_Students year       
------------ -----------
           1           1
           2           2
           1           3
           1           4

(4 rows affected)
           
-----------
         50

(1 rows affected)
           
-----------
          5

(1 rows affected)
           
-----------
          4

(1 rows affected)
           
-----------
          1

(1 rows affected)
           
-----------
         12

(1 rows affected)

(1 rows affected)
id          name                           major                          year        NumCredits 
----------- ------------------------------ ------------------------------ ----------- -----------
          1 mahi                           computer science                         5        NULL
          2 emma                           IIT                                      2        NULL
          3 carolina                       computer information systems             3        NULL
          4 lea                            business                                 1        NULL
          5 max                            biology                                  2          50

(5 rows affected)

(3 rows affected)
name                           major                          year        yearsofMembership NumMeetings
------------------------------ ------------------------------ ----------- ----------------- -----------
mahi                           computer science                         5                 4          30
emma                           IIT                                      2                 3          20

(2 rows affected)
name                           major                          year        yearsofMembership NumMeetings
------------------------------ ------------------------------ ----------- ----------------- -----------
mahi                           computer science                         5                 4          30
emma                           IIT                                      2                 3          20
carolina                       computer information systems             3              NULL        NULL
lea                            business                                 1              NULL        NULL
max                            biology                                  2              NULL        NULL
NULL                           NULL                                  NULL                 3          10

(6 rows affected)
name                           major                          year        yearsofMembership NumMeetings
------------------------------ ------------------------------ ----------- ----------------- -----------
mahi                           computer science                         5                 4          30
emma                           IIT                                      2                 3          20
carolina                       computer information systems             3              NULL        NULL
lea                            business                                 1              NULL        NULL
max                            biology                                  2              NULL        NULL

(5 rows affected)
name                           major                          year        yearsofMembership NumMeetings
------------------------------ ------------------------------ ----------- ----------------- -----------
mahi                           computer science                         5                 4          30
emma                           IIT                                      2                 3          20
NULL                           NULL                                  NULL                 3          10

(3 rows affected)
name                           yearsofMembership
------------------------------ -----------------
mahi                                           4
emma                                           4
carolina                                       4
lea                                            4
max                                            4
mahi                                           3
emma                                           3
carolina                                       3
lea                                            3
max                                            3
mahi                                           3
emma                                           3
carolina                                       3
lea                                            3
max                                            3

(15 rows affected)


© Copyright 2025 One Compiler Pvt. Ltd. | Privacy Policy | Terms & Conditions