SQL Aggregate Functions In Where Clause
SQL Aggregate Function In Where Clause return the maximum conditional value of the record from a table.
Understand with Example
The Tutorial help you to understand an Example from 'SQL Aggregate Functions'. To understand this, we create a table 'Stu_Table'. The create table construct a table 'Stu_Table' with different Table attribute specified in the query.
Next, we might want to conditionally select the data from a table. For example, we may want to only retrieve stores with sales above $1,000. To do this, we use the WHERE keyword. The syntax is as follows:
Create the Table Stu_Table
SQL statement to create table:
Insert data into Stu_Table
Insert into keywords in SQL add the records or rows to the table 'Stu_Table'.
SQL statement to insert data into table:
Records in the table:
Next, the given below Query want to return the conditionally select the data from a table 'Stu_Table'. For example, we want to retrieve the maximum value of the 'stu_id' with name search specified in the 'Stu_Name'. In order to overcome, we use the WHERE clause. The Syntax is given below: