Construct a query that will show the number of days that exist between the first invoice and last invoice, for each month, for each employee, using the min max function. Be sure to provide the SQL script that will carry out this function.
I know I have to join my invoice table with employee table, group by employee number
and show an output o f
emp name, emp id, mon, total days
The query needs to show how many days between start date and end date
I have to use max and min the subtract max minus min = num of days I'm missing something in my syntax I need help finishing the below query and writing the min man syntax
inner join invoice
on employee.emp_numb = invoice.emp_number