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

Vampire bats have a natural anticoagulant in their saliva that permits continuous bleeding after they painlessly open a wound with their incisors. This capillary blood does not cause any significant blood loss to their victims.

Did you know?

The top five reasons that children stay home from school are as follows: colds, stomach flu (gastroenteritis), ear infection (otitis media), pink eye (conjunctivitis), and sore throat.

Did you know?

All patients with hyperparathyroidism will develop osteoporosis. The parathyroid glands maintain blood calcium within the normal range. All patients with this disease will continue to lose calcium from their bones every day, and there is no way to prevent the development of osteoporosis as a result.

Did you know?

The lipid bilayer is made of phospholipids. They are arranged in a double layer because one of their ends is attracted to water while the other is repelled by water.

Did you know?

To maintain good kidney function, you should drink at least 3 quarts of water daily. Water dilutes urine and helps prevent concentrations of salts and minerals that can lead to kidney stone formation. Chronic dehydration is a major contributor to the development of kidney stones.

For a complete list of videos, visit our video library