Write separate queries using a join, a subquery, a CTE, and then an EXISTS to list all AdventureWorks customers who have not placed an order.
Q1: Write the code in PHP MYSQL to update the salary of the employee where where name is ali and salary is an even number. (4)
CNIC
Name
Salary
Mobile Number
Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The
first is issued at four sites and attempts to find the Salary of employee by given their numbers.
Assume that we have set the simple predicates for application 1 are P1: Job-Title=
PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is
issued at two sites where the employee with a salary less than 15,00 USD are managed at one site,
whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set
the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6:
Commission= 400.00 USD.
1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above.
2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of
fragmentation.
Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predicates for application 1 are P1: Job-Title= PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is issued at two sites where the employee with a salary less than 15,00 USD are managed at one site, whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6: Commission= 400.00 USD. 1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above. 2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of fragmentation.
Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predicates for application 1 are P1: Job-Title= PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is issued at two sites where the employee with a salary less than 15,00 USD are managed at one site, whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6: Commission= 400.00 USD. 1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above. 2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of fragmentation.
EMPLOYEE Commission Emp-ld 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 Emp-Name M. Junaid M. Usman M. Awais M. Jawad M. Ali M. Azhar M. Adeel M. Imran M. Nazer M. Asad M. Sadiq M. Kamarn M. Khuram M. Usama Job Title PRESIDENT MANAGER MANAGER MANAGER ANALYST ANALYST CLERK SALESMAN SALESMAN SALESMAN SALESMAN CLERK CLERK CLERK Hire-Date 1991-11-18 1991-05-01 1991-06-09 1991-04-02 1997-04-19 1991-12-03 1990-12-18 1991-02-20 1991-02-22 1991-09-28 1991-09-08 1997-05-23 1991-12-03 1992-01-23 Salary 6000.00 USD 2750.00 USD 2550.00 USD 2957.00 USD 3100.00 USD 3100.00 USD 900.00 USD 1700.00 USD 1350.00 USD 1350.00 USD 1600.00 USD 1200.00 USD 1050.00 USD 1400.00 USD 400.00 USD 600.00 USD 1500.00USD 0.00 USD Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predica
Differentiate Homogenous Databases with Heterogenous databases with the help of a case study.
Get all the potential users. Fetch the user_ids who liked at least 2 videos published by "Disney" channel, and who did not subscribe to the channel (channel_id = 352).
potential_user_idno_of_likes
sir plz explain the sql query
Get all the user_ids who liked at least 5 videos published by "Tedx" channel.
active_user_idno_of_likes
sir plz explain the sql query
Best time to upload a comedy video:
DunkFest channel is planning to upload a video in the "COMEDY" genre
Give the channel the best suitable hour of the day when users positively engage more with comedy videos.
hour_of_engagementno_of_likes5
sir plz explain sql query