Advertisements
Advertisements
प्रश्न
Differentiate between order by and group by command.
फरक स्पष्ट करा
Advertisements
उत्तर
| Basis of Difference | ORDER BY | GROUP BY |
|---|---|---|
| Purpose | Sorts result rows | Forms groups of similar values |
| Main use | Ascending or descending arrangement | Aggregate calculations by group |
| Common functions | Not necessary | Used with SUM(), COUNT(), AVG() etc. |
| Result | Ordered rows | One result row per group |
| Example | ORDER BY price DESC |
GROUP BY scode |
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
