Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
17 views
SQL Code 1
Uploaded by
Sriraman
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save sql code 1 For Later
Download
Save
Save sql code 1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
17 views
SQL Code 1
Uploaded by
Sriraman
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save sql code 1 For Later
Carousel Previous
Carousel Next
Save
Save sql code 1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 2
Search
Fullscreen
1.
SELECT Customer_Id, name, sum(amount) As total_amount
from Table
group by Customer_Id
having year = '2023';
2. SELECT Department_name, avg(salary) as average_salary
from table
group by Departmemnt_name
order by avg(salary) desc;
3. SELECT d.department_name, max(select count(employee_id) group by department_name)
as highest_number
from employees e join departments d on e.department_id = d.department_id;
4. SELECT customer_id, count(order_id as No_of_orders
from order
group by customer_id;
6. SELECT product_id, sum(quantity)
from transactions
where transcation_date between '1-5-2024' and '30-5-2024'
group by product_id
limit 3;
7. SELECT employee_id, employee_name, salary
from emploees e join managers m on e.manager_id = m.manager_id
where m.salary<e.salary;
1. SELECT Customer_Id, name, sum(amount) As total_amount
from Table
group by Customer_Id
having year = '2023';
2. SELECT Department_name, avg(salary) as average_salary
from table
group by Departmemnt_name
order by avg(salary) desc;
3. SELECT d.department_name, max(select count(employee_id) group by department_name)
as highest_number
from employees e join departments d on e.department_id = d.department_id;
4. SELECT customer_id, count(order_id as No_of_orders
from order
group by customer_id;
6. SELECT product_id, sum(quantity)
from transactions
where transcation_date between '1-5-2024' and '30-5-2024'
group by product_id
limit 3;
7. SELECT employee_id, employee_name, salary
from emploees e join managers m on e.manager_id = m.manager_id
where m.salary<e.salary;
1. SELECT Customer_Id, name, sum(amount) As total_amount
from Table
group by Customer_Id
having year = '2023';
2. SELECT Department_name, avg(salary) as average_salary
from table
group by Departmemnt_name
order by avg(salary) desc;
3. SELECT d.department_name, max(select count(employee_id) group by department_name)
as highest_number
from employees e join departments d on e.department_id = d.department_id;
4. SELECT customer_id, count(order_id as No_of_orders
from order
group by customer_id;
6. SELECT product_id, sum(quantity)
from transactions
where transcation_date between '1-5-2024' and '30-5-2024'
group by product_id
limit 3;
7. SELECT employee_id, employee_name, salary
from emploees e join managers m on e.manager_id = m.manager_id
where m.salary<e.salary;
You might also like
Pricing Procedure In SAP
From Everand
Pricing Procedure In SAP
Shyamala N
4.5/5 (24)
SQL Exercises (HR Database) (SUBQUERIES)
PDF
80% (10)
SQL Exercises (HR Database) (SUBQUERIES)
6 pages
Learn SAP SD in 24 Hours
From Everand
Learn SAP SD in 24 Hours
Alex Nordeen
No ratings yet
assignment-sql
PDF
No ratings yet
assignment-sql
3 pages
SQL Questions
PDF
No ratings yet
SQL Questions
5 pages
_SQL_QUERY_QUESTIONS_COMMONLY_ASKED_IN_INTERVIEWS__1732271818
PDF
No ratings yet
_SQL_QUERY_QUESTIONS_COMMONLY_ASKED_IN_INTERVIEWS__1732271818
7 pages
SQL Scenario Based Questions-1
PDF
No ratings yet
SQL Scenario Based Questions-1
25 pages
Homework3 SQL
PDF
No ratings yet
Homework3 SQL
6 pages
Basic SQL Interview Questions
PDF
No ratings yet
Basic SQL Interview Questions
17 pages
JOINS
PDF
No ratings yet
JOINS
26 pages
pre_rdbms
PDF
No ratings yet
pre_rdbms
3 pages
DBMS Practical
PDF
No ratings yet
DBMS Practical
6 pages
Unit-3 SQL - Practical Demonstration
PDF
No ratings yet
Unit-3 SQL - Practical Demonstration
14 pages
Abcd of sql
PDF
No ratings yet
Abcd of sql
4 pages
IMP Queries
PDF
No ratings yet
IMP Queries
3 pages
postgress notes
PDF
No ratings yet
postgress notes
8 pages
Select From: 'Jessica'
PDF
No ratings yet
Select From: 'Jessica'
16 pages
Sample Queries
PDF
No ratings yet
Sample Queries
10 pages
Dbms Activity
PDF
No ratings yet
Dbms Activity
2 pages
Lab 4
PDF
No ratings yet
Lab 4
1 page
SQL Vamsi
PDF
No ratings yet
SQL Vamsi
3 pages
Day 6 - SQL Commands
PDF
No ratings yet
Day 6 - SQL Commands
2 pages
SQL assignemnt 3
PDF
No ratings yet
SQL assignemnt 3
2 pages
Gajanan
PDF
No ratings yet
Gajanan
23 pages
Database Queries
PDF
No ratings yet
Database Queries
10 pages
HR Database SQL Queries Watermarked
PDF
No ratings yet
HR Database SQL Queries Watermarked
5 pages
BSCS23034 Lab05
PDF
No ratings yet
BSCS23034 Lab05
12 pages
project 3
PDF
No ratings yet
project 3
3 pages
Assignment 3
PDF
No ratings yet
Assignment 3
9 pages
Assignment 3 - Shouvik(1159)
PDF
No ratings yet
Assignment 3 - Shouvik(1159)
15 pages
TDSQL
PDF
No ratings yet
TDSQL
5 pages
SQL Q&A in Meesho and Flipkart
PDF
No ratings yet
SQL Q&A in Meesho and Flipkart
21 pages
mircoproject queries
PDF
No ratings yet
mircoproject queries
9 pages
Exercise
PDF
No ratings yet
Exercise
4 pages
Create Employee Table
PDF
No ratings yet
Create Employee Table
5 pages
SQL 1
PDF
No ratings yet
SQL 1
12 pages
SQL NEW Assignment
PDF
No ratings yet
SQL NEW Assignment
3 pages
QUERIES FOR PRACTICE(simple)
PDF
No ratings yet
QUERIES FOR PRACTICE(simple)
9 pages
14-March Lab Questions
PDF
No ratings yet
14-March Lab Questions
2 pages
sql queries for practice pdf
PDF
No ratings yet
sql queries for practice pdf
6 pages
database lab 6 (answer)
PDF
No ratings yet
database lab 6 (answer)
2 pages
Source Code Dbms
PDF
No ratings yet
Source Code Dbms
14 pages
SQL A
PDF
No ratings yet
SQL A
5 pages
Dbms SQL Queries
PDF
No ratings yet
Dbms SQL Queries
4 pages
SQL File
PDF
No ratings yet
SQL File
5 pages
Rayen SGBD
PDF
No ratings yet
Rayen SGBD
2 pages
correction-TP BDA
PDF
No ratings yet
correction-TP BDA
4 pages
employees
PDF
No ratings yet
employees
2 pages
MySQL Interview Questions.!!
PDF
No ratings yet
MySQL Interview Questions.!!
13 pages
LEET CODE Medium Hard problems
PDF
No ratings yet
LEET CODE Medium Hard problems
10 pages
University of Technology Sydney SQL-Exam-Notes 2019 Database Fundamental
PDF
No ratings yet
University of Technology Sydney SQL-Exam-Notes 2019 Database Fundamental
2 pages
Create Table Employee
PDF
No ratings yet
Create Table Employee
2 pages
Employee Data Analysis - Queries
PDF
No ratings yet
Employee Data Analysis - Queries
2 pages
Single
PDF
No ratings yet
Single
2 pages
Lab
PDF
No ratings yet
Lab
3 pages
Simple and Complex Queries
PDF
No ratings yet
Simple and Complex Queries
31 pages
75 SQL Questions & Answers
PDF
No ratings yet
75 SQL Questions & Answers
39 pages
SQL Queries
PDF
No ratings yet
SQL Queries
2 pages
sql queries
PDF
No ratings yet
sql queries
2 pages
Management Accounting: Business Strategy & Performance: Decision-Making by Numbers
From Everand
Management Accounting: Business Strategy & Performance: Decision-Making by Numbers
Commerce Central
No ratings yet