SQLSample Questions
SQLSample Questions
3- Create a foreign key relationship in the Attendance table for the EmployeeID
that references the EmployeeID in the Employees table.
4- Establish a foreign key constraint in the Salaries table for the EmployeeID that
references the EmployeeID in the Employees table.
5- Add a check constraint to the Projects table to ensure that the Budget value is
greater than zero.
6- Create a check constraint in the Salaries table to enforce that the BaseSalary
falls between 30,000 and 200,000.
8- Add a unique constraint to the EMAIL field in the Employees table to ensure
email addresses are unique.
10- Retrieve the average value of the Bonus field from the Salaries table.
11- display the first names, last names, and department names of employees in the
'Quality Assurance' department
12- display the Employees table for records where the FIRSTName consists of exactly
four letters.
13- Select records from the Employees table where the FIRSTName starts with the
letter 'A'.
14- Retrieve the full names, department names, and check-in times of employees who
checked in after 8:30 AM on October 24, 2023
15- Count the number of employees who checked in after 8:30 AM on October 24, 2023
16- Calculate the total BaseSalary and Bonus from the Salaries table.