Need sql command line code By category number, with grand totals, give me the nu
ID: 3541774 • Letter: N
Question
Need sql command line code
By category number, with grand totals, give me the number of SERVICE REQUESTs, total estimated hours, total hours spent and total remaining hours.
SQL> desc service_request
Name Null? Type
----------------------------------------- -------- ----------------------------
SERVICE_ID NOT NULL NUMBER(4)
SLIP_ID NUMBER(4)
CATEGORY_NUM NUMBER(4)
DESCRIPTION CHAR(255)
STATUS CHAR(255)
EST_HOURS NUMBER(4,2)
SPENT_HOURS NUMBER(4,2)
NEXT_SERVICE_DATE DATE
Explanation / Answer
SELECT sum(SERVICE_ID),sum(EST_HOURS),sum(SPENT_HOURS),sum(EST_HOURS)-sum(SPENT_HOURS) FROM SERVCICES
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.