Question

use SQL to do this, include output

apply all types of aggregate functions you have learned so far (functions like avg, sum, asc, desc, count, max, min) on the appropriate data from all the columns in Figure 1.4. Show the SQL query and the resultant output (Table). building budget salary dept.name ID name 22222 12121 Einstein Wu 95000 Physics Finance History Comp. Sci Elec. Eng Biology Co

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

Solution:

I am using mySQL workbench to execute the aggregate function queries.

Aggregate Functions in SQL:

Most commonly used aggregate functions are :

1.Min - This function is used to get the minimum value from set of values in a column.

Syntax: Select min(column_name) from tablename;

2.Max - This function is used to get the minimum value from set of values in a column.

Syntax: Select max(column_name) from tablename;

3.Count - This function is used to count the number of rows in a table.

Syntax: Select count(*) from tablename;

4.Sum - This function is used to calculate the sum of all values in a column.

Syntax: Select sum(column_name) from tablename;

5.Avg - This function is used to calculate the average of all the values in a column.

Syntax: Select avg(column_name) from tablename;

Output:

MySQL Workbench Local instance MySQL80 x View Query Tools Scripting Help File Edit Database Server Query 1 SOLAdditions NavigMySQL Workbench Local instance MySQL80 x Tools Scripting Help View Query File Edit Database Server Query 1: SOLAdditions NaviMySQL Workbench Local instance MySQL80 x View Query Tools Scripting Help File Edit Database Server Query 1: SOLAdditions NaviMySQL Workbench Local instance MySQL80 x View Query Tools Scripting Help File Edit Database Server Query 1: SOLAdditions NaviMySQL Workbench Local instance MySQL80 x View Query Tools Scripting Help File Edit Database Server Query 1: SOLAdditions NaviMySQL Workbench Local instance MySQL80 x View Query Tools Scripting Help File Edit Database Server Query 1: SOLAdditions Navi

Add a comment
Know the answer?
Add Answer to:
use SQL to do this, include output apply all types of aggregate functions you have learned...
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
ADVERTISEMENT