Complete the SQL query to select the attribute that functionally determines others.
SELECT [1] FROM Employees;The EmployeeID uniquely identifies each employee, so it functionally determines other attributes.
Complete the SQL query to find rows where the functional dependency might be violated.
SELECT EmployeeID, Department FROM Employees WHERE Department [1] 'Sales';
We want to find employees not in the Sales department to check if the dependency holds, so we use <> (not equal).
Fix the error in the SQL query that checks functional dependency violations.
SELECT [1], COUNT(*) FROM Employees GROUP BY [1] HAVING COUNT(*) > 1;
Grouping by EmployeeID helps find duplicates violating uniqueness, which breaks functional dependency.
Fill both blanks to create a query that finds attributes functionally dependent on EmployeeID.
SELECT EmployeeID, [1] FROM Employees WHERE [2] = 'HR';
Salary depends on EmployeeID, and we filter by Department = 'HR' to check functional dependency within HR.
Fill all three blanks to create a query that checks for functional dependency violations by counting duplicates.
SELECT [1], [2], COUNT(*) FROM Employees GROUP BY [3] HAVING COUNT(*) > 1;
Select EmployeeID and Department, group by both to find duplicates violating functional dependency.