Queries to a database:

Options
- Are written in English
- Can use aggregate fuinction like SUM and COUNT
- Both A and B
- None of these


CORRECT ANSWER : None of these

Discussion Board
data base

questions online

tewelde hailemariam 12-2-2018 02:19 AM

SUM

B is correct you can use SUM and COUNT in a query see below:

SELECT movies.title,
movies.date,
COUNT(movie_reviews.review_id) AS vReviewCount,
SUM(CASE movie_reviews.thumbs WHEN "UP" THEN 1 ELSE 0 END) AS vThumbsUp,
SUM(CASE movie_reviews.thumbs WHEN "DOWN" THEN 1 ELSE 0 END) AS vThumbsDown,
FROM movies
LEFT OUTER JOIN movie_reviews ON movies.code = movie_reviews.movie_code
GROUP BY movies.title, movies.date
ORDER BY movies.date DESC

The correct answer is B

zero 04-9-2017 09:16 AM

Explanation.

Answer : None of these.

A query is an enquiry into the database using the SELECT statement. A query is used to extract data from the database in a readable format according to the user's request.

Jayesh Sonar 03-3-2015 01:57 AM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement