713 views
0 0 votes
In SQL we can use aggregate function without using GROUP by
clause. (TRUE /FALSE)

1 Answer

2 2 votes
Yes it is possible .

eg : SELECT AVG(Price) AS PriceAverage FROM Products;

now see this

SELECT NAME , AVG(Price) AS PriceAverage FROM Products;

this is not possible . in that you have to place GROUP BY NAME . peace
Position:
Show:

Related questions

0 0 votes
1 1 answer
24
24 views
GO Classes asked 7 hours ago
24 views
Consider$\mathrm{Product}(\mathrm{pid},\mathrm{name},\mathrm{brand},\mathrm{price},\mathrm{color})$.The SQL query is:SELECT DISTINCT name FROM Product p WHERE color = 'gr...
3 3 votes
1 1 answer
160
160 views
GO Classes asked Sep 3
160 views
Consider the relation$\text{Student(sid,\ name,\ age)}$where the attributes occur in the schema in the order shown.Which of the following statements correctly inserts the...
2 2 votes
1 1 answer
131
131 views
GO Classes asked Sep 3
131 views
A table contains the following attributes:$\text{code\ CHAR(6)}$$\text{name\ VARCHAR(10)}$Which of the following statements are correct?A value of $\text{code}$ has a fix...
2 2 votes
1 1 answer
457
457 views
shc asked Jan 19
457 views
In SQL-92 (which is what GATE assumes), which columns are allowed in SELECT and HAVING, when GROUP BY is present or not ?Which columns/attributes can be aggregated or non...