MySQL Forums
Forum List  »  Newbie

Table Design
Posted by: Sean Franco-Norris
Date: November 15, 2022 03:33PM

I am currently developing a report with a form for me to put the start date and end date then it generates a table.

I have no idea what they are called, so I hope I didn't break any rules and ask the same questions that somebody already asked in other posts. If I do, please redirect me to those.

I was wondering if it is possible to do a SQL coding that will show the table looking like this:

|Programs| |Staff| |Total_Enc| |Total_Late| |Total_Not_Late| |Percentage|
"All Program" "null" "null" "null" "null" "null"
"null" "Staff Name Here" "#'s" "#'s" "#'s" "%"

The first row is a header; the second row is only the name of the program, then the rest are nulls, the third row - the first column is null; the second column is the staff's name, then the rest are the #'s using the count and sum.

If I did them in excel, I usually used subtotal to get the grouping based on the program name. I am hoping I can do similar with SQL.

I hope I am making any sense.

Options: ReplyQuote


Subject
Written By
Posted
Table Design
November 15, 2022 03:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.