0% found this document useful (0 votes)
6 views3 pages

SQL Queries and String Manipulation Guide

The document outlines the aim of performing simple queries, string manipulation operations, and aggregate functions using SQL. It provides examples of SQL commands for selecting data, manipulating strings, and applying aggregate functions like COUNT, AVG, MIN, and MAX. The conclusion states that string manipulation and aggregate functions have been successfully executed in SQL.

Uploaded by

2022ci22f
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

SQL Queries and String Manipulation Guide

The document outlines the aim of performing simple queries, string manipulation operations, and aggregate functions using SQL. It provides examples of SQL commands for selecting data, manipulating strings, and applying aggregate functions like COUNT, AVG, MIN, and MAX. The conclusion states that string manipulation and aggregate functions have been successfully executed in SQL.

Uploaded by

2022ci22f
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Aim: To perform simple queries,string manipulation operations and

aggregate functions.

Software Required: MY SQL

Theory: SQL aggregation function is used to perform the


calculations on multiple rows of a single column of a table. It
returns a single [Link] is also used to summarize the data.

These are just a few examples, and there are many other SQL
functions and features available for working with data in a database.
Simple Queries:

Select all rows from a table:


SQL
SELECT * FROM table_name;

Select specific columns from a table:


SQL
SELECT column1, column2 FROM table_name;

Select rows based on a condition:


SQL
SELECT * FROM table_name WHERE condition;

String Manipulation Operations:

Convert a string to uppercase:


SQL
SELECT UPPER(column_name) FROM table_name;

Extract a substring from a string:


SQL
SELECT SUBSTRING(column_name, start_position, length) FROM table_name;

Concatenate strings:
SQL
SELECT CONCAT(column1, ' ', column2) FROM table_name;

Aggregate Functions:

Count the number of rows in a table:


SQL
SELECT COUNT(*) FROM table_name;

Calculate the average of a column:


SQL
SELECT AVG(column_name) FROM table_name;

Find the minimum value in a column:


SQL
SELECT MIN(column_name) FROM table_name;

Find the maximum value in a column:


SQL
SELECT MAX(column_name) FROM table_name;

Conclusion: We have successfully performed string manipulation


operations and aggregate functions in SQL.

You might also like