Author Question: Brackets represent repetitive elements. Indicate whether the statement is true or ... (Read 33 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?

Complications of influenza include: bacterial pneumonia, ear and sinus infections, dehydration, and worsening of chronic conditions such as asthma, congestive heart failure, or diabetes.

Did you know?

Although the Roman numeral for the number 4 has always been taught to have been "IV," according to historians, the ancient Romans probably used "IIII" most of the time. This is partially backed up by the fact that early grandfather clocks displayed IIII for the number 4 instead of IV. Early clockmakers apparently thought that the IIII balanced out the VIII (used for the number 8) on the clock face and that it just looked better.

Did you know?

Essential fatty acids have been shown to be effective against ulcers, asthma, dental cavities, and skin disorders such as acne.

Did you know?

Children of people with alcoholism are more inclined to drink alcohol or use hard drugs. In fact, they are 400 times more likely to use hard drugs than those who do not have a family history of alcohol addiction.

Did you know?

Symptoms of kidney problems include a loss of appetite, back pain (which may be sudden and intense), chills, abdominal pain, fluid retention, nausea, the urge to urinate, vomiting, and fever.

For a complete list of videos, visit our video library