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

Your heart beats over 36 million times a year.

Did you know?

Hip fractures are the most serious consequences of osteoporosis. The incidence of hip fractures increases with each decade among patients in their 60s to patients in their 90s for both women and men of all populations. Men and women older than 80 years of age show the highest incidence of hip fractures.

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.

Did you know?

In ancient Rome, many of the richer people in the population had lead-induced gout. The reason for this is unclear. Lead poisoning has also been linked to madness.

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.

For a complete list of videos, visit our video library