SQL GROUP BY - Overview, syntax

          

SQL GROUP BY - Overview, syntax

SQL GROUP BY - Introduction and syntax

<<Previous  Next>>

Explain the SQL GROUP BY statement. Write SQL syntax for the SQL GROUP BY statement along with an example.

GROUP BY: It is used with aggregate functions to group the result-set by one or more columns.

Syntax:
SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name

Example:
SELECT Emp_id,joiningdt,SUM(salary) FROM employee GROUP BY emp_id,joiningdt


SQL CONCATENATE

SQL CONCATENATE: This clause combine together (concatenate) the results from several different fields...............

SQL EXISTS

SQL EXISTS: If the subquery returns at least one row the EXISTS condition is considered "to be met"...............

SQL SELECT INTO

SQL SELECT INTO: The SELECT INTO statement selects data from one table and inserts it into a different table. Used often for creating back up’s............

Explain the SQL WHERE statement. Write SQL syntax for the SQL WHERE statement along with an example.

WHERE: It is used to fetch records that fulfill a specified condition.................

Explain the SQL UNION statement. Write SQL syntax for the SQL UNION statement along with an example.

SQL UNION: The UNION operator is used to combine the result-set of two or more SELECT statements Tables of both the select statement................

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring