Question

1.Describe summary queries. (In 150 to 300 words)

1.Describe summary queries. (In 150 to 300 words)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Summary queries:

Summary queries (also called Group-By queries) are used to summarise the contents of a table.

Creating Summary Queries:

When we want to generate rows of data that summarize data in our tables. For example, we want to find a sum or an average for the values in a column. For doing this we  create a computed column that includes aggregate (column) functions.

If a computed column involving an aggregate function is added to a query, the system implicitly  defines a GROUP BY clause for us. We can also modify GROUP BY clause, or add a GROUP BY clause for a query , the Group command from the Query menu or the Group button on the toolbar.

To add a column to the GROUP BY clause, move it from the left list box to the right list box using the arrow buttons. To change the relative order of columns within the GROUP BY clause, use the Up and Down buttons.

Creating Summary Queries in SQL:

The GROUP BY statement groups rows that have the same values into summary rows.The GROUP BY statement is often used with aggregate functions (COUNT, MAX, MIN) to group the result-set by one or more columns.

SELECT COUNT(students),Students
FROM Class
GROUP BY Section;

This SQL  statement will group the students from each section in class thus giving us the idea that from class X there are four section with each section having Y number of students.

.////////////////////////////////////////////////////////////////////.......................................................///////////////////////////////////////////////////////////////////////////

Add a comment
Know the answer?
Add Answer to:
1.Describe summary queries. (In 150 to 300 words)
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT