Page 108 - Computer Software Application TP - Volume 1
P. 108

COMPUTER SOFTWARE APPLICATION - CITS



           EXERCISE 29 :  Joins, Group by, Having, Sub query


            Objectives

            At the end of this exercise you shall be able to
           •  use joins in queries
           •  use group by in queries
           •  use having & subquery in queries
           Requirements



           Tools/Materials
           •   Desktop/Laptop with latest configuration
           •   Operating system: window 10:11
           •  XAMPP server r3.3.0


           Procedure

           TASK 1 :Setup & Connect To MySQL:
           Make sure you have MySQL installed on your Windows machine. You can use a tool like MySQL Command-Line
           Client or a graphical interface like MySQL Workbench.
           mysql -u your username –p



















           Enter your password when prompted.


           TASK 2 :Create sample tables and insert values
           1  Let’s create two simple tables -
           CREATE TABLE employee (
               employee id INT PRIMARY KEY,
               employee name VARCHAR(50),

               department id INT
           );












                                                           93
 CITS : IT & ITES - Computer Software Application - Exercise 28
   103   104   105   106   107   108   109   110   111   112   113