How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLPROG Your Own Question

ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7677
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

Created an SQL query time ago that I need to modify. I need

Customer Question

Created an SQL query long time ago that I need to modify. I need to modify it to sort my results to show
Total Covers by Time sorted by Month
In other words :
JANUARY 7 AM = 300 Total covers
JANUARY 8 AM = 500 total covers
ect... and so forth
Here is the code I had written a long time ago
SELECT startdate as 'StartDate',HOUR(STARTTIME) AS 'StartHour',COUNT(*) as 'Checks',SUM(PERSONCOUNT) as 'Covers', SUM(CKAMOUNT) as 'Total $$' FROM POSHSTHD
WHERE POSHSTHD.STARTDATE BETWEEN {?Select Lower And Higher Date%%}
GROUP BY STARTDATE,HOUR(STARTTIME)
ORDER BY STARTDATE,HOUR(STARTTIME)
Submitted: 1 year ago.
Category: Programming
Expert:  Leela-TheProgrammer replied 1 year ago.

Hi,

Thanks for using JustAnswer. This is Leela and I will help you with the question today.

I can help you update the SQL query.

Can you please provide DATABASE TABLE SCHEMA details so that i can work on the query.

If we can do a remote session that would be great so that we can try the query directly on your environment directly.

Regards,

Leela