单选题
Examine this partial query:
SELECT ch.channel_type, t.month, co.country_code, SUM(s.amount_sold) SALES
FROM sales s, times t, channels ch, countries co
WHERE s.time_ id = t.time id
AND s.country_ id = co. country id
AND s. channel id = ch.channel id
AND ch.channel type IN ('Direct Sales', 'Internet')
AND t.month IN ('2000-09', '2000-10')
AND co.country code IN ('GB', 'US')
Examine this output:
CHANNEL TYPEMONTHcoSALES
——————————————————————————————————
Internet2000-09GB16569
Internet2000-09US124224
Internet2000-09140793
Internet2000-10GB14539
Internet2000-10US137054
Internet292387
Direct Sales2000-09GB85223
Direct Sales2000-09US638201
Direct Sales2000-09723424
Direct Sales2000-10GB91925
Direct Sales2000-10US638201
Direct Sales2000-09774222
Direct Sales1497646
Which GROUP BY clause must be added so the query returns the results shown?
相关试题
单选题
Examine the data in the EMPLOYEES table:
EMPLOYEE_ID LAUT NANE MONTHLY SALARY MONTTHLY COMEHISSIOM PCT
101Kochhar24000<NULL>
102Ernst17000.5
103Rajs21000.2
104LORENTZ25000<NULL>
105Morris12000<NULL>
Which statement will compute the total annual compensation for each employee?
单选题
Choose the best answer
The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2.
The table has two rows whose COST_LAST_MANE values are Anderson and Ausson.
Which query produces output for CUST_LAST_SAME containing Oder for the first row and Aus for the
Second?
单选题
NameNull?Type
-------------------------------------------------------------------------------
EMP_NONOT NULLNUMBER(4)
LAST_NAMEVARCHAR2(100)
HIRE_DATEDATE
SALARYNUMBER(8,2)
For each employee in department 90 you want to display
1 their last name
2 the number of complete weeks they have been employed
The output must be sorted by the number of weeks, starting with the longest serving employee
First.Which statement will accomplish this?
单选题
Choose the best answer.
Examine the description of the EMPLOYEES table:
NameNullType
----------------------------------------------------------
EMP_IDNOT NULNUMBER
EMP_NAMEVARCHAR2 (40)
DEPT_IDNUMBER(2)
SALARYNUMBER(8,2)
JOIN_DATEDATE
Which query is valid?
单选题
Examine the data in the EMPLOYEES table:
EMPLOYEE ID LAST NAME MONTHLY SATARY MONTHLY COMMISSION PCT
101Kochhar24000<NULL>
102Ernst17000.5
103Rajs21000.2
104Lorentz25000<NULL>
105Morris12000<NULL >
Which statement will compute the total annual compensation for each employee?
单选题
In your session, the NLS._DAE_FORMAT is DD- MM- YYYY.There are 86400 seconds in a day.Examine
This result:
DATE
02-JAN-2020
Which statement returns this?
单选题
Examine the description of the EMPLOYEES table:
NameNull?Type
--------------------------------------------
EMPLOYEE IDNOT NULLNUMBER (4)
LAST NAMENOT NULLVARCHAR2 (100)
SALARYNOTNOT NULLNUMBER (6,2)
DEPARTMENT_ IDNOT NULLNUMBER(4)
Examine this query:
1 SETECTe。 last_ name,
2e。 salary,
3a。 avg_ sal
4FROM employees e
5WHERE e。 salary > (SELECT AVG (a。 salary) AS avg _ _sal
6FROMemployees a
7WHERE a。 department_ 1d = e。epartment。 1d)
8ORDER BY e。 last_ name;
Which line produces an error?
单选题
You must find the number of employees whose salary is lower than employee 110.
Which statement fails to do this?