Question: a)write a query in SQL to create employees table using table-1 b) write a query in SQL to find highest salary employees c)write a query
a)write a query in SQL to create employees table using table-1
b) write a query in SQL to find highest salary employees
c)write a query in SQL to find highest salary for female employees
d) write a query in SQL to display the brunch_id, number og employees and maximum salary of each branch
a) write a query in SQL to create customer and order type
b) write a SQL statement to make a list of customer id, first name , last name, birthday, order id and date.
c) write a SQL statement that gives the first name, last name, birthday, and adress of customers whose order date is after 2018-03-01 and who commented on.
Table 2: Customer customer_id first_name last_name birthday tel 1 ibrahim Kaya 1986-03-28 212-000-000 2 Dilek Bilir 1986-04-13 232-000-001 3 Freddi Boagey 1985-02-07 719-724-7869 4 Korhan Yldz 1974-04-14 216-231-801 5 Clemmie Betchley 1973-11-07 NULL 6 Ergun Maxwell 1991-09-04 312-000-002 7 Murat Erdoan 1964-08-30 312-000-003 8 Thacher Naseby 1993-07-17 947-555-3970 9 Aynur Feymann 1992-05-23 559-181-3000 10 Levy Mynett 1969-10-13 212-000-010 Points 2273 947 2967 457 address 000 Street No:1 011 Street No:2 030 Street No:8 088 Street No:1 099 Street No:2 056 Street No:14 230 Street No:9 450 Street No:3 010 Street No:5 300 Street No:10 city Newyork stanbul stanbul Chicago Londra Edinburgh Edinburgh Atlanta Orlando Hampton 3675 3073 1672 205 1486 796 Table 3: Order order id customer id order date status 1 6 2019-01-30 1 2 7 2018-08-02 2 3 8 2017-12-01 1 4 2 2017-01-22 1 5 5 2017-08-25 2 6 10 2018-11-18 1 7 1 2018-09-22 2 8 2 2018-06-08 1 9 10 2017-07-05 2 10 6 2018-04-22 2 MUN00 comments NULL NULL NULL NULL NULL Aliquam erat volutpat. In congue. NULL Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id. Nulla mollis molestie lorem. Quisque ut erat. NULL Table 1: Employees employeeld first name 100 Ibrahim 101 Dilek 102 Sinan 103 Ebru 104 Serpil 105 Galileo 106 Murat 107 Ali 108 Kemal last name Kaya Bilir Ere Yelkenci Fisek Galilei Bilgin Ak Turan birthday 1967-11-17 1961-05-11 1964-03-15 1971-06-25 1980-02-05 1958-02-19 1969-09-05 1973-07-22 1978-10-01 gender M F M F F M M M M salary 250000 110000 75000 63000 55000 69000 78000 65000 71000 branch id 1 1 2 2 2 2 3 3 3 Table 2: Customer customer_id first name last_name 1 Ibrahim Kaya 2 Dilek Bilir 3 Freddi Boagey 4 Korhan Yldz 5 Clemmie Betchley 6 Ergun Maxwell 7 Murat Erdogan 8 Thacher Naseby 9 Aynur Feymann 10 Levy Mynett birthday tel 1986-03-28 212-000-000 1986-04-13 232-000-001 1985-02-07 719-724-7869 1974-04-14 216-231-801 1973-11-07 NULL 1991-09-04 312-000-002 1964-08-30 312-000-003 1993-07-17 947-555-3970 1992-05-23 559-181-3000 1969-10-13 212-000-010 III address 000 Street No:1 011 Street No:2 030 Street No:8 088 Street No:1 099 Street No:2 056 Street No:14 230 Street No:9 450 Street No:3 010 Street No:5 300 Street No:10 city Newyork istanbul Istanbul Chicago Londra Edinburgh Edinburgh Atlanta Orlando Hampton Points 2273 947 2967 457 3675 3073 1672 205 1486 796 Table 3: Order order id customer_id order date status 1 6 2019-01-30 1 2 7 2018-08-02 2 3 8 2017-12-01 1 4 2 2017-01-22 1 5 5 2017-08-25 2 6 10 2018-11-18 1 7 1 2018-09-22 2 8 2 2018-06-08 1 9 10 2017-07-05 2 10 6 2018-04-22 2 comments NULL NULL NULL NULL NULL Aliquam erat volutpat. In congue NULL Mauris enim leo, rhoncus sed, vestibulum sit amet, cursus id. Nulla mollis molestie lorem. Quisque ut erat. NULL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
