You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
271 B
SQL

/*24. Write a query in SQL to display job ID for those jobs that were done by two or more for more than 300 days.*/
SELECT job_id
FROM job_history
WHERE end_date-start_date >300
GROUP BY job_id
HAVING COUNT(*)>=2;