I have 3 sql statements that I need to print to a html table.
1: selects all employee initials that has made an order between two dates.
2: sums up the count of each employee's orders between two dates.
3: sums up each employee's total amount of money spent between two dates.
All data is in a table: Orders(orderNr, itemNr, orderAmount, employee, date, price)
Now, I have to print all three into a table, and I am struggling to figure out how to loop through them correctly while having all the right resultsets.
The table should show: Employee - Amount of orders - Total price
Any help is greatly appreciated.