Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Database 1
« Previous
Next »
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
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
SQL Server (40)
SQL Server (28)
SQL Server (25)
Data Warehousing (10)
Biztalk (15)
SQL Server DBA (15)
Database (30)
Database (28)
DBMS (20)
Advertisement
▲