SlideShare a Scribd company logo
1 of 19
SQL QUERIES
CREATING TABLE The SQL syntax for  CREATE TABLE  is CREATE TABLE "table_name" ("column 1" "data_type_for_column_1", "column 2" "data_type_for_column_2", ... )
This ALTER TABLE sql command is to make changes in the table. The synatx is: ALTER TABLE[ owner_name ] table_name [ADD column_name datatype attributes] [MODIFY{column_name datatype |  column_constraint}]  Example Query: ALTER TABLE STUDENT ADD(PERCENTAGE NUMBER(5,2));
The  SQL INSERT INTO  clause facilitates the process of inserting data into a SQL table. Here is how you can insert a new row into the Weather table, using  SQL INSERT INTO: Insert into tablename (  fieldname, fieldname, fieldname )  values (  value, value, value ); INSERT
SELECT The  SQL SELECT  clause selects data from one or more database tables and/or views. In its basic form the  SQL SELECT syntax looks like this: SELECT ColumnName1, ColumnName2, … FROM Table1
The  SQL WHERE  clause works in conjunction with other SQL clauses like SELECT, INSERT and UPDATE to specify a search condition for these statements. We are going to give an example of the SQL WHERE clause used along with the  SQL SELECT clause: SELECT AverageTemperature  FROM Weather WHERE City = 'New York' WHERE
The  SQL DISTINCT  clause works in conjunction with the SQL SELECT clause and selects only distinct (unique) data from a database table(s). Here is an example of SQL DISTINCT clause SELECT DISTINCT Column1 FROM Table1 The  SQL DISTINCT  clause works in conjunction with the SQL SELECT clause and selects only distinct (unique) data from a database table(s). Here is an example of SQL DISTINCT clause SELECT DISTINCT Column1 FROM Table1 DISTINCT
UPDATE The  SQL UPDATE clause serves to update data in database table. The SQL UPDATE clause basic syntax looks like this: UPDATE Table1 SET Column1 = Value1, Column2 = Value2, …
DELETE The SQL DELETE   clause is used to delete data from a database table. The simplest  SQL DELETE syntax looks like this: DELETE FROM Table1
TRUNCATE The SQL TRUNCATE TABLE clause deletes all rows from a database table. Here is the  SQL TRUNCATE TABLE syntax: TRUNCATE TABLE Weather
ORDER BY The SQL ORDERBY clause defines in what order to return a data set retrieved with a SQL SELECT statement. Here is an example of using SQL ORDER BY to order the rows : Select  */fieldname<mask> ...   from  tablename   order by  fieldname ;
SQL AVERAGE To get the average temperature for the Weather table use the AVG SQL   aggregate function: SELECT AVG(AverageTemperature) FROM Weather
SQL MINIMUM To get the minimum value from a numeric table column, use the  SQL MIN  aggregate function: SELECT MIN(AverageTemperature) FROM Weather
SQL GROUP BY The SQL GROUP BY CITY clause is used along with the SQL aggregate functions and specifies the groups where selected rows are placed. WHEN one or more aggregate functions are presented in the SQL SELECT column list, the SQL GROUP BY clause calculates a summary value for each group EX:Our task is to calculate the average temperature for each of the cities in the Weather table. Here is how to accomplish that using the SQL GROUP BY clause: SELECT City, AVG(AverageTemperature) FROM Weather GROUP BY City
SQL JOIN The SQL JOIN clause selects data from two or more tables tied together by matching table columns SELECT Weather.City, Weather.AverageTemperature, Weather.Date, State.State FROM Weather JOIN State ON Weather.City = State.City
AND/OR The Syntax for  AND/OR SELECT &quot;column_name&quot; FROM &quot;table_name&quot; WHERE &quot;simple condition&quot; {[AND|OR] &quot;simple condition&quot;}+
IN The Syntax for  IN  statement in SQL is SELECT &quot;column_name&quot; FROM &quot;table_name&quot; WHERE &quot;column_name&quot; IN ('value1', 'value2', ...)
BETWEEN The Syntax for  BETWEEN  statement in SQL is SELECT &quot;column_name&quot; FROM &quot;table_name&quot; WHERE &quot;column_name&quot; BETWEEN 'value1' AND 'value2'
DROP   The Syntax for  DROP  statement in SQL is DROP TABLE &quot;table_name&quot;

More Related Content

What's hot (18)

Sql DML
Sql DMLSql DML
Sql DML
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
Ddl commands
Ddl commandsDdl commands
Ddl commands
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
 
Sql commands
Sql commandsSql commands
Sql commands
 
Sql basics v2
Sql basics v2Sql basics v2
Sql basics v2
 
Database Systems - SQL - DDL Statements (Chapter 3/2)
Database Systems - SQL - DDL Statements (Chapter 3/2)Database Systems - SQL - DDL Statements (Chapter 3/2)
Database Systems - SQL - DDL Statements (Chapter 3/2)
 
DML Commands
DML CommandsDML Commands
DML Commands
 
Sql delete, truncate, drop statements
Sql delete, truncate, drop statementsSql delete, truncate, drop statements
Sql delete, truncate, drop statements
 
Sql server ___________session_16(views)
Sql server  ___________session_16(views)Sql server  ___________session_16(views)
Sql server ___________session_16(views)
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
Oracle SQL DML Statements
Oracle SQL DML StatementsOracle SQL DML Statements
Oracle SQL DML Statements
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
 
SQL
SQLSQL
SQL
 
SQL Tutorial for Beginners
SQL Tutorial for BeginnersSQL Tutorial for Beginners
SQL Tutorial for Beginners
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
 
Sql alter table statement
Sql alter table statementSql alter table statement
Sql alter table statement
 
Oracle: PLSQL Commands
Oracle: PLSQL CommandsOracle: PLSQL Commands
Oracle: PLSQL Commands
 

Viewers also liked

diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...
diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...
diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...MFG Innovationsagentur
 

Viewers also liked (8)

Babitha5.php
Babitha5.phpBabitha5.php
Babitha5.php
 
Vlaamse ardennen
Vlaamse ardennenVlaamse ardennen
Vlaamse ardennen
 
Babitha5.php
Babitha5.phpBabitha5.php
Babitha5.php
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
El Agua
El AguaEl Agua
El Agua
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha3.css
Babitha3.cssBabitha3.css
Babitha3.css
 
diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...
diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...
diretto.resc - Eine Plattform für mobile, mediengestützte Kollaboration in Ka...
 

Similar to Babitha2 Mysql

Similar to Babitha2 Mysql (20)

Query
QueryQuery
Query
 
Sql
SqlSql
Sql
 
SQL Fundamentals
SQL FundamentalsSQL Fundamentals
SQL Fundamentals
 
SQL
SQLSQL
SQL
 
SQL Class Note By Amit Maity PowerPoint Presentation
SQL Class Note By Amit Maity PowerPoint PresentationSQL Class Note By Amit Maity PowerPoint Presentation
SQL Class Note By Amit Maity PowerPoint Presentation
 
SQL Query
SQL QuerySQL Query
SQL Query
 
Oraclesql
OraclesqlOraclesql
Oraclesql
 
MySQL-commands.pdf
MySQL-commands.pdfMySQL-commands.pdf
MySQL-commands.pdf
 
1670595076250.pdf
1670595076250.pdf1670595076250.pdf
1670595076250.pdf
 
Cheat sheet SQL commands with examples and easy understanding
Cheat sheet SQL commands with examples and easy understandingCheat sheet SQL commands with examples and easy understanding
Cheat sheet SQL commands with examples and easy understanding
 
SQL 🌟🌟🔥.pdf
SQL 🌟🌟🔥.pdfSQL 🌟🌟🔥.pdf
SQL 🌟🌟🔥.pdf
 
SQL learning notes and all code.pdf
SQL learning notes and all code.pdfSQL learning notes and all code.pdf
SQL learning notes and all code.pdf
 
SQL report
SQL reportSQL report
SQL report
 
Mysql 120831075600-phpapp01
Mysql 120831075600-phpapp01Mysql 120831075600-phpapp01
Mysql 120831075600-phpapp01
 
Hira
HiraHira
Hira
 
Sql commands
Sql commandsSql commands
Sql commands
 
Database Management System 1
Database Management System 1Database Management System 1
Database Management System 1
 
Sql
SqlSql
Sql
 
Sql
SqlSql
Sql
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
 

More from banubabitha

More from banubabitha (11)

Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha5.php
Babitha5.phpBabitha5.php
Babitha5.php
 
Babitha.4appach
Babitha.4appachBabitha.4appach
Babitha.4appach
 
Babitha.4appach
Babitha.4appachBabitha.4appach
Babitha.4appach
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha2.mysql
Babitha2.mysqlBabitha2.mysql
Babitha2.mysql
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 

Recently uploaded

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Babitha2 Mysql

  • 2. CREATING TABLE The SQL syntax for CREATE TABLE is CREATE TABLE &quot;table_name&quot; (&quot;column 1&quot; &quot;data_type_for_column_1&quot;, &quot;column 2&quot; &quot;data_type_for_column_2&quot;, ... )
  • 3. This ALTER TABLE sql command is to make changes in the table. The synatx is: ALTER TABLE[ owner_name ] table_name [ADD column_name datatype attributes] [MODIFY{column_name datatype | column_constraint}] Example Query: ALTER TABLE STUDENT ADD(PERCENTAGE NUMBER(5,2));
  • 4. The SQL INSERT INTO clause facilitates the process of inserting data into a SQL table. Here is how you can insert a new row into the Weather table, using SQL INSERT INTO: Insert into tablename ( fieldname, fieldname, fieldname ) values ( value, value, value ); INSERT
  • 5. SELECT The SQL SELECT clause selects data from one or more database tables and/or views. In its basic form the SQL SELECT syntax looks like this: SELECT ColumnName1, ColumnName2, … FROM Table1
  • 6. The SQL WHERE clause works in conjunction with other SQL clauses like SELECT, INSERT and UPDATE to specify a search condition for these statements. We are going to give an example of the SQL WHERE clause used along with the SQL SELECT clause: SELECT AverageTemperature FROM Weather WHERE City = 'New York' WHERE
  • 7. The SQL DISTINCT clause works in conjunction with the SQL SELECT clause and selects only distinct (unique) data from a database table(s). Here is an example of SQL DISTINCT clause SELECT DISTINCT Column1 FROM Table1 The SQL DISTINCT clause works in conjunction with the SQL SELECT clause and selects only distinct (unique) data from a database table(s). Here is an example of SQL DISTINCT clause SELECT DISTINCT Column1 FROM Table1 DISTINCT
  • 8. UPDATE The SQL UPDATE clause serves to update data in database table. The SQL UPDATE clause basic syntax looks like this: UPDATE Table1 SET Column1 = Value1, Column2 = Value2, …
  • 9. DELETE The SQL DELETE clause is used to delete data from a database table. The simplest SQL DELETE syntax looks like this: DELETE FROM Table1
  • 10. TRUNCATE The SQL TRUNCATE TABLE clause deletes all rows from a database table. Here is the SQL TRUNCATE TABLE syntax: TRUNCATE TABLE Weather
  • 11. ORDER BY The SQL ORDERBY clause defines in what order to return a data set retrieved with a SQL SELECT statement. Here is an example of using SQL ORDER BY to order the rows : Select */fieldname<mask> ... from tablename order by fieldname ;
  • 12. SQL AVERAGE To get the average temperature for the Weather table use the AVG SQL aggregate function: SELECT AVG(AverageTemperature) FROM Weather
  • 13. SQL MINIMUM To get the minimum value from a numeric table column, use the SQL MIN aggregate function: SELECT MIN(AverageTemperature) FROM Weather
  • 14. SQL GROUP BY The SQL GROUP BY CITY clause is used along with the SQL aggregate functions and specifies the groups where selected rows are placed. WHEN one or more aggregate functions are presented in the SQL SELECT column list, the SQL GROUP BY clause calculates a summary value for each group EX:Our task is to calculate the average temperature for each of the cities in the Weather table. Here is how to accomplish that using the SQL GROUP BY clause: SELECT City, AVG(AverageTemperature) FROM Weather GROUP BY City
  • 15. SQL JOIN The SQL JOIN clause selects data from two or more tables tied together by matching table columns SELECT Weather.City, Weather.AverageTemperature, Weather.Date, State.State FROM Weather JOIN State ON Weather.City = State.City
  • 16. AND/OR The Syntax for AND/OR SELECT &quot;column_name&quot; FROM &quot;table_name&quot; WHERE &quot;simple condition&quot; {[AND|OR] &quot;simple condition&quot;}+
  • 17. IN The Syntax for IN statement in SQL is SELECT &quot;column_name&quot; FROM &quot;table_name&quot; WHERE &quot;column_name&quot; IN ('value1', 'value2', ...)
  • 18. BETWEEN The Syntax for BETWEEN statement in SQL is SELECT &quot;column_name&quot; FROM &quot;table_name&quot; WHERE &quot;column_name&quot; BETWEEN 'value1' AND 'value2'
  • 19. DROP The Syntax for DROP statement in SQL is DROP TABLE &quot;table_name&quot;