Author Question: Brackets represent repetitive elements. Indicate whether the statement is true or ... (Read 26 times)

james

  • Hero Member
  • *****
  • Posts: 573
Brackets   represent repetitive elements.
 
  Indicate whether the statement is true or false

Question 2

Fully explain the following code:SELECT TutorKey, COUNT(SessionTimeKey) AS Total SessionsFROM SessionGROUP BY TutorKeyHAVING COUNT(SessionTimeKey)<4
 
  What will be an ideal response?



k.lashomb

  • Sr. Member
  • ****
  • Posts: 346
Answer to Question 1

FALSE

Answer to Question 2

The SELECT includes the column TutorKey and the aggregate function COUNT which returns a count of the column SessionTimeKey. Both are from the table Session. Because TutorKey is not a part of the aggregate function it must be included in a GROUP BY clause. The criteria for the query includes an aggregate function and so must use the HAVING key word.



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
 

Did you know?

Barbituric acid, the base material of barbiturates, was first synthesized in 1863 by Adolph von Bayer. His company later went on to synthesize aspirin for the first time, and Bayer aspirin is still a popular brand today.

Did you know?

The Babylonians wrote numbers in a system that used 60 as the base value rather than the number 10. They did not have a symbol for "zero."

Did you know?

Elderly adults are at greatest risk of stroke and myocardial infarction and have the most to gain from prophylaxis. Patients ages 60 to 80 years with blood pressures above 160/90 mm Hg should benefit from antihypertensive treatment.

Did you know?

Bacteria have flourished on the earth for over three billion years. They were the first life forms on the planet.

Did you know?

Pink eye is a term that refers to conjunctivitis, which is inflammation of the thin, clear membrane (conjunctiva) over the white part of the eye (sclera). It may be triggered by a virus, bacteria, or foreign body in the eye. Antibiotic eye drops alleviate bacterial conjunctivitis, and antihistamine allergy pills or eye drops help control allergic conjunctivitis symptoms.

For a complete list of videos, visit our video library