0% found this document useful (0 votes)
46 views

SQL Report

The document details the author's experience in an Internshala training on SQL for data analytics. It discusses the objectives and structure of the course, as well as key learnings around SQL fundamentals, data manipulation, and gaining skills relevant to data analysis.

Uploaded by

ishantsomani15
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)
46 views

SQL Report

The document details the author's experience in an Internshala training on SQL for data analytics. It discusses the objectives and structure of the course, as well as key learnings around SQL fundamentals, data manipulation, and gaining skills relevant to data analysis.

Uploaded by

ishantsomani15
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
You are on page 1/ 37

Index

1. Introduction
2. About Internshala Trainings
3. About the SQL for Data Analytics Training
o Course Objectives
o Course Structure
4. Key Learnings
o Fundamentals of SQL
o Data Manipulation Language (DML)
o Data Definition Language (DDL)
o Advanced SQL Concepts (Optional)
5. Project Work (Optional)
6. Challenges Faced (Optional)
7. Overall Experience and Benefits
8. Conclusion
Introduction: Internshala Summer Training - SQL for Data
Analytics

The ever-growing field of data analytics hinges on the ability to


effectively extract, manipulate, and analyze data. SQL (Structured
Query Language) serves as the fundamental tool for interacting with
data stored in relational databases, the backbone of many data-driven
applications.

This report details my experience participating in the Internshala


Summer Training program on SQL for Data Analytics. This program
aimed to equip participants with the necessary skills to navigate the
world of SQL and leverage its power for data analysis tasks.

Through this training, I embarked on a journey to:

 Grasp the core concepts of relational databases and understand


how SQL interacts with them.
 Master the fundamentals of SQL syntax and utilize commands
to retrieve, manipulate, and analyze data.
 Gain proficiency in working with data structures like tables,
columns, and rows, and perform operations like filtering,
sorting, and aggregation.

The Internshala Summer Training on SQL for Data Analytics


provided a valuable foundation for building a strong data analysis
skillset. This newfound knowledge equips me to tackle data-driven
challenges and contribute meaningfully to the exciting world of data
analytics.

2. Internshala Trainings: Empowering Learners with In-Demand


Skills

Internshala Trainings is an online learning platform established with


the mission of equipping students with the practical skills and
industry-relevant knowledge necessary to thrive in today's job market
[1]. Their comprehensive course offerings span a wide range of fields,
including:

 Data Science
 Web Development
 Digital Marketing
 Design
 Programming Languages (Python, Java, etc.)
 Business & Management
 Creative Arts
 Languages

Internshala Trainings prioritizes delivering high-quality educational


experiences through:
 Structured Learning Paths: Their courses are meticulously
designed to provide a well-defined learning journey, starting
with fundamental concepts and progressing towards advanced
topics.
 Engaging Content: A combination of pre-recorded video
lectures, interactive exercises, and assignments keeps learners
engaged and fosters a deeper understanding of the material.
 Industry-Recognized Certifications: Upon successful
completion of a course, participants receive government-
recognized certificates that can enhance their resumes and
showcase their newly acquired skills to potential employers [1].

By providing accessible and effective training programs, Internshala


Trainings empowers learners to bridge the skill gap and confidently
navigate their chosen career paths.

I am completed my training from internshala in data analytics


for sql. And many of Indian and foreign teacher uploaded their
content.
Internshala is an internship and online training platform, based in
Gurgaon, India. Founded by Sarvesh Agrawal, an IIT Madras
alumnus, in 2011, the website helps students find internships with
organisations in India.
The platform, which was founded in 2010, started out as a WordPress
blog that aggregated internships across India and articles on
education, technology and skill gap. Internshala launched its online
trainings in 2014. As of 2018, the platform had 3.5 million students
and 80,000 companies.

I am attached My Training Certificate which Internshala gives after


completion of courses
3. About the SQL for Data Analytics Training: Unlocking the
Power of Data

3.1 Course Objectives

The Internshala Summer Training program on SQL for Data


Analytics was designed to equip participants with the essential
knowledge and practical skills to become adept at working with data
stored in relational databases. The core objectives of the course
focused on:

 Building a Foundational Understanding:


o Grasping the core principles of relational databases and

database management systems (DBMS).


o Understanding the structure and organization of data

within tables, columns, and rows.


o Familiarizing oneself with fundamental data types

commonly used in SQL.


 Mastering SQL Fundamentals:
o Demystifying the basic syntax and structure of SQL
statements, including SELECT, FROM, WHERE, and
others.
o Learning to effectively retrieve specific data from tables

using filtering and selection techniques.


o Mastering data manipulation techniques like inserting,

updating, and deleting data within tables.


 Empowering Data Analysis:
o Acquiring the ability to sort and aggregate data using

commands like ORDER BY and GROUP BY.


o Leveraging subqueries for complex data retrieval tasks

involving multiple conditions.

This foundational knowledge would enable participants to confidently


interact with relational databases and extract the information
necessary for data analysis endeavors.

Some iterations of the course may have ventured into more advanced
topics like:

 Advanced Joins: Exploring various join types (INNER JOIN,


LEFT JOIN, etc.) to seamlessly combine data from multiple
tables for more comprehensive analysis.
 Window Functions: Unveiling the power of window functions
for complex calculations within result sets.
 Stored Procedures and Functions: Introducing the concept of
stored procedures and functions for code reusability and
streamlining complex data manipulation tasks.

By successfully completing the Internshala Summer Training program


on SQL for Data Analytics, participants would be well-positioned to
tackle data-driven challenges and contribute meaningfully to the field
of data analysis.
3.2 Course Structure: A Hands-On Learning Journey

The Internshala Summer Training program on SQL for Data


Analytics employed a structured approach designed to maximize
learning outcomes. This typically involved a blend of the following
elements:

 Pre-recorded Video Lectures: Subject matter experts delivered


comprehensive video lectures, providing a clear and concise
introduction to key SQL concepts. These lectures served as the
foundation for building a strong understanding of SQL
functionalities.
 Interactive Exercises: To solidify theoretical knowledge, the
training likely incorporated interactive exercises. These
exercises provided a platform to apply learned concepts in a
practical setting, allowing participants to test their understanding
and gain immediate feedback.
 Practice Assignments: The course may have included regular
assignments designed to challenge participants to apply their
SQL skills to more complex problems. Working on these
assignments likely involved writing queries to retrieve and
manipulate data from sample datasets, further reinforcing the
learned material.
 Final Project (Optional): Some iterations of the program might
have culminated in a final project. This project could have
involved working with a real-world dataset, independently
constructing queries to analyze the data, and potentially
generating reports or visualizations based on the results. This
project would have served as a valuable opportunity to integrate
all the learned skills and demonstrate proficiency in SQL for
data analysis tasks.
The specific structure of the course may vary depending on the
iteration you participated in. However, the core principle likely
remained consistent: providing a comprehensive learning experience
that combines theoretical knowledge with practical application. This
blended approach allows participants to grasp SQL concepts
effectively and gain the confidence to utilize them for real-world data
analysis endeavors.

4. Key Learnings: Unlocking the Power of SQL for Data Analysis

The Internshala Summer Training on SQL for Data Analytics


equipped me with a valuable skillset for navigating the world of data.
Here's a breakdown of the key areas of knowledge I gained:

4.1 Foundational Building Blocks: Understanding the Relational


Database Landscape
 Relational Database Fundamentals: Grasped the core

concepts of relational databases, including tables, columns,


rows, data types (integers, strings, dates, etc.), and primary and
foreign keys, which ensure data integrity within the database
structure.
 Database Management Systems (DBMS): Understood the role

of DBMS as software applications that facilitate the creation,


manipulation, and administration of relational databases.
Learned about popular DBMS options like MySQL,
PostgreSQL, and Microsoft SQL Server.

The foundation of working with SQL lies in understanding the


relational database model. This section of the training likely focused
on the core elements that make up relational databases and how SQL
interacts with them. Here's a breakdown of the key concepts you
might have covered:

 Relational Database Model: This core concept establishes a


structured approach for organizing data. Data is stored in tables,
which resemble spreadsheets with rows and columns. Each row
represents a unique data entry, and each column represents a
specific attribute or characteristic of that data. For instance, a
table storing customer information might have columns for
customer ID, name, email address, and phone number.
 Data Types: Databases assign data types (e.g., integer, string,
date) to each column, ensuring data integrity and enabling
appropriate operations. You likely learned about common data
types such as integers for whole numbers, decimals for numbers
with fractional parts, strings for text data, and dates for storing
timestamps.
 Primary Keys: Each table within a relational database requires
a primary key, a unique identifier for each data entry (row)
within the table. Primary keys prevent duplicate entries and
ensure data consistency.
 Foreign Keys: Relational databases often store data across
multiple interconnected tables. Foreign keys establish
relationships between these tables by referencing the primary
key of another table. This allows for efficient data retrieval and
manipulation across linked tables.

By understanding these foundational elements, you gained a solid


grasp of how relational databases structure data and how SQL
interacts with them to retrieve, manipulate, and analyze the
information stored within.

4.2 Mastering the Language: Core SQL Syntax and Functionality


 SQL Fundamentals: Acquired a solid understanding of the
basic SQL syntax, including essential clauses like SELECT,
FROM, WHERE, ORDER BY, and GROUP BY. This
knowledge empowers me to retrieve specific data from tables,
filter data based on certain criteria, sort results in a particular
order, and group data for effective analysis.
 Data Manipulation Language (DML): Learned how to
leverage DML statements like INSERT, UPDATE, and
DELETE to effectively manipulate data within tables. This
allows me to add new data entries, modify existing data, and
remove unwanted records as needed.

The Internshala SQL for Data Analytics Training likely placed


significant emphasis on Data Manipulation Language (DML). DML
empowers you to interact with data within relational database tables,
allowing you to add, modify, and retrieve information as needed.
Here's a deeper dive into the key functionalities covered:

4.2.1 Modifying Data: INSERT, UPDATE, and DELETE


 INSERT: This statement allows you to add new data entries

(rows) to a table. You'll likely have learned how to specify the


column names and the corresponding values for each new entry.
 UPDATE: This statement enables you to modify existing data

within a table. You can update specific columns based on


certain criteria (using the WHERE clause) to reflect changes or
corrections in the data.
 DELETE: This statement allows you to remove unwanted data

entries from a table. Similar to UPDATE, you can leverage the


WHERE clause to target specific rows for deletion based on
defined criteria.
4.2.2 Refining Your Data: Filtering, Sorting, and Aggregation
 WHERE Clause: This essential clause acts as a filter, allowing

you to retrieve specific data entries that meet certain conditions.


You can use comparison operators (equal to, greater than, less
than, etc.) and logical operators (AND, OR, NOT) to refine your
results and extract only the relevant data.
 ORDER BY Clause: This clause sorts the retrieved data based

on a specified column. You can choose ascending or descending


order for sorting, allowing you to organize your results in a way
that facilitates analysis.
 GROUP BY Clause: This powerful clause groups data based

on a shared characteristic (e.g., customer category, product


type). This grouping is often used in conjunction with aggregate
functions (SUM, COUNT, AVERAGE, etc.) to summarize and
analyze data trends within those groups. For instance, you might
use GROUP BY to categorize customer data by region and then
calculate the average purchase amount per region using the
AVG function.
 HAVING Clause: While similar to the WHERE clause,

HAVING allows you to filter groups of data created with the


GROUP BY clause. This enables you to focus on specific
groups that meet additional criteria, providing a more granular
level of control over your data analysis.
4.2.3 Subqueries: Unveiling Hidden Insights

Subqueries are a powerful feature within DML that allows you to


embed a nested query within another SQL statement. This enables
you to retrieve data based on the results of another query, unlocking a
wider range of possibilities for data manipulation and analysis. For
instance, you might use a subquery to identify a specific customer ID
from one table and then use that ID within the main query to retrieve
detailed order information about that customer from another table.

By mastering these DML functionalities, you are now equipped to


effectively manipulate data within relational database tables. You can
add, update, and delete data as needed, filter and sort results for
focused analysis, and leverage subqueries to unlock hidden insights
from your data.

4.3 Deepening My Skillset: Advanced SQL Concepts (Optional)

Depending on the course structure, I might have delved into more


advanced areas of SQL, including:

 Joins: Explored the power of joins (INNER JOIN, LEFT JOIN,


RIGHT JOIN, etc.) to seamlessly combine data from multiple
tables based on a shared field, enabling the extraction of
comprehensive insights from complex datasets.
 Window Functions: Gained an understanding of window
functions, which allow for performing complex calculations
within result sets. This could involve ranking data entries,
calculating moving averages, or identifying the highest or
lowest values within a specific data window.
 Stored Procedures and Functions: (Optional) For some
advanced courses, I might have been introduced to stored
procedures and functions, which enable code reusability and
streamline complex data manipulation tasks.

By mastering these core and advanced functionalities, I am now


equipped to write effective SQL queries to interact with relational
databases, extract and manipulate data, and pave the way for
insightful data analysis.

4.3 Data Definition Language (DDL): Shaping the Database


Landscape

While DML focuses on manipulating data within existing tables, Data


Definition Language (DDL) empowers you to define and manage the
structure of the database itself. The Internshala SQL for Data
Analytics Training likely covered these essential DDL statements:
 CREATE: This statement forms the foundation for establishing
new database objects. You'll have learned how to use CREATE
to construct new tables, specifying column names, data types,
and constraints (like primary and foreign keys) to ensure data
integrity. Additionally, CREATE can be used to define views,
virtual tables that offer simplified access to complex data
queries, and indexes, which optimize data retrieval performance.
 ALTER: This statement allows you to modify the structure of
existing database objects. You might have practiced using
ALTER to add new columns to a table, modify existing column
data types, or alter constraints as needed to adapt the database
schema to evolving data requirements.
 DROP: This statement enables you to remove database objects
that are no longer needed. You'll likely have learned how to
DROP tables, views, and indexes to declutter your database and
maintain efficient data management practices.

By mastering these DDL statements, you gained the ability to actively


shape the structure of your relational database. You can create new
tables to store data, define views for simplified data access, and
leverage indexes to optimize query performance. This newfound
knowledge empowers you to contribute to the design and maintenance
of a well-organized and efficient database system.

4.4 Advanced SQL Concepts (Optional): Delving Deeper into


Data Analysis

The Internshala SQL for Data Analytics Training might have offered
an optional section exploring advanced functionalities that unlock
even greater potential for data manipulation and analysis. Here's a
glimpse into some of these advanced concepts you might have
encountered:
4.4.1 Joining Forces: Unveiling Insights from Multiple Tables

Relational databases often store data across interconnected tables.


Joins are a cornerstone of advanced SQL, enabling you to seamlessly
combine data from multiple tables based on a shared field. Here are
some common join types you might have explored:

 INNER JOIN: Returns only rows where there's a match in both


tables based on the join condition. This is ideal for retrieving
data with a direct relationship between the joined tables.
 LEFT JOIN: Includes all rows from the left table (the table

specified before the JOIN keyword) and matching rows from the
right table. Rows from the right table with no match will have
NULL values in the joined columns. This is useful for
preserving all data from the left table even if there's no
corresponding data in the right table.
 RIGHT JOIN: Similar to LEFT JOIN, but includes all rows

from the right table and matching rows from the left table.
Unmatched rows in the left table will have NULL values.
4.4.2 Window Functions: Calculations Within Result Sets

Window functions introduce a powerful concept that allows you to


perform complex calculations within the results of an SQL query.
These calculations are applied to "windows" of data, enabling you to
analyze trends and patterns within your data. Some examples of
window functions you might have encountered include:

 ROW_NUMBER(): Assigns a unique sequential number to


each row within the result set, allowing you to rank or order data
based on specific criteria.
 SUM() OVER(): Calculates the running total for a specified
column within a defined window of data. This is useful for
identifying trends or patterns over time.
 AVG() OVER(): Calculates the average within a window of
data, allowing you to analyze averages for specific groups or
categories within your results.
4.4.3 Stored Procedures and Functions: Reusing Code for
Efficiency

For complex or frequently used SQL statements, the training might


have introduced you to stored procedures and functions. These
functionalities promote code reusability, streamlining your workflow
and reducing the risk of errors:

 Stored Procedures: Are a set of SQL statements grouped


together under a specific name. You can execute these
procedures by calling their names, simplifying complex data
manipulation tasks.
 Functions: Similar to stored procedures, functions are reusable
blocks of SQL code that return a specific value. Functions can
accept parameters, allowing you to customize their behavior for
different scenarios.

By venturing into these advanced concepts, you've expanded your


SQL skillset and unlocked the potential for more sophisticated data
analysis. You can now leverage joins to combine data from multiple
tables, perform intricate calculations within result sets using window
functions, and streamline your workflow with stored procedures and
functions.

5. Project Work : Putting Your Skills into Action

Some iterations of the Internshala SQL for Data Analytics Training


might have culminated in a capstone project. This project would have
served as a valuable platform to integrate the acquired SQL skills and
demonstrate their practical application in a data analysis scenario.
Here's a breakdown of what the project could have entailed:
 Real-World Dataset: You might have been provided with a
real-world dataset from a specific domain (e.g., e-commerce
sales data, customer demographics, social media statistics).
 Project Goal: The project would likely have outlined a specific
goal, such as analyzing customer purchasing trends, identifying
factors influencing social media engagement, or exploring
correlations within the provided dataset.
 Applying SQL Skills: To achieve the project objective, you
would have utilized the SQL skills learned throughout the
training. This could involve:
o Writing SQL queries to extract relevant data from the

dataset based on the project requirements.


o Employing data manipulation techniques (filtering,

sorting, aggregation) to prepare the data for analysis.


o Performing calculations and deriving insights from the

data using SQL functions and aggregation.


 Data Visualization (Optional): The project might have
encouraged the use of data visualization tools (e.g., Excel charts,
Python libraries) to present the extracted insights in a clear and
compelling manner. This visual representation would effectively
communicate the findings gleaned from the data analysis.

By successfully completing a project of this nature, you would have


gained valuable real-world experience in applying SQL for data
analysis tasks. This experience would not only solidify your
understanding of SQL concepts but also showcase your ability to
translate theoretical knowledge into practical data manipulation and
analysis skills.

In database analytics is the technology that allows data processing to


be conducted within the database by building analytic logic into the
database itself. Doing so eliminates the time and effort required to
transform data and move it back and forth between a database and a
separate analytics application.

PostgreSQL is an advanced object-relational database management


system that supports an extended subset of the SQL standard,
including transactions, foreign keys, subqueries, triggers, user-
defined types and functions.

Here I am attaching my project page


Technology used in Project

In this project I used PostgreSQL which is a powerful,


open source object-relational database system that uses
and extends the SQL language combined with many
features that safely store and scale the most complicated
data workloads. The origins of PostgreSQL date back to
1986 as part of the POSTGRES project at the
University of California at Berkeley and has more than
30 years of active development on the core platform.

PostgreSQL has earned a strong reputation for its


proven architecture, reliability, data integrity, robust
feature set, extensibility, and the dedication of the open
source community behind the software to consistently
deliver performant and innovative solutions.
PostgreSQL runs on all major operating systems, has
been ACIDcompliant since 2001, and has powerful add-
ons such as the popular PostGIS geospatial database
extender. It is no surprise that PostgreSQL has become
the open source relational database of choice for many
people and organisations.

4.1 Technical Details of Project/Study

PostgreSQL is a relational database management system (RDBMS).


That means it is a system for managing data stored in relations.
Relation is essentially a mathematical term for table.

4.1 Project Code

-- 1.Create a table named 8deliveries9 with appropriate data types for


columns.
create
table
deliveri
es( id
int,
inning
int,
over
int, ball
int,
batsman
char(100),
non_striker
char(100),
bowler
char(100),
batsman_ru
ns int,
extra_runs
int,
total_runs
int,
is_wicket
int,
dismissal_ki
nd char(50),
player_dism
issed
char(100),
fielder
char(100),
extras_typ
e char(25),
batting_te
am
char(50),
bowling_t
eam
char(50));
-- drop
table
deliveries;
select * from deliveries;

-- 2.Create a table named 8matches9 with appropriate data types for


columns.
create
table
match
es( id
int
primar
y key,
city
char(5
0),
date date ,
player_of_match char(100),
venue
char(10
0),
neutral_
venue
int,
team_1
char(50)
,
team_2
char(50)
,
toss_wi
nner
char(50)
,
toss_de
cision
char(10)
, winner
char(50)
, result
char(10)
,
result_
margin
int,
eliminat
or
char(5),
method
varchar(
5),
umpire_
1
char(50)
,
umpire_
2
char(50)
); --
drop
table
matches
;
select * from matches;

-- 3.Import data from csv file 9IPL_matches.csv9 attached in


resources to 8matches9.
copy matches from 'C:\Program Files\PostgreSQL\14\data\dataset\
IPL_matches_.csv' CSV header;

-- 4.Import data from csv file 9IPL_Ball.csv9 attached in resources to


8deliveries9.
copy deliveries from 'C:\Program Files\PostgreSQL\14\data\dataset\
IPL_Ball.csv' CSV header;
-- 5.Select the top 20 rows of the
deliveries table. select * from
deliveries
order by id limit 20;

-- 6.Select the top 20 rows of the


matches table. select * from
matches
order by id limit 20;

-- 7.Fetch data of all the matches played on


2nd May 2013. select * from matches
where date = '02-05-2013';

-- 8.Fetch data of all the matches where the margin of


victory is more than 100 runs. select * from matches
where result = 'runs' and result_margin > '100' order by
result_margin desc; select * from matches where result =
'runs' and result_margin > '100' order by result_margin
desc;

-- 9.Fetch data of all the matches where the final scores of


both teams tied and order it in descending order of -- the date.
select * from matches where
resul
t=
'tie'
orde
r by
date
desc;
-- 10.Get the count of cities that have hosted an IPL match.
select count (distinct city) as "Total_City_Hosted" from matches;

-- 11.Create table deliveries_v02 with all the columns of deliveries


and an additional column ball_result
-- containing value boundary, dot or other depending on the total_run
(boundary for >= 4, dot for 0 and other for -- any other number)
create table deliveries_v02 as select *,
CASE WHEN total_runs >= 4 then 'boundary'
WHEN total_runs =
0 THEN 'dot' else
'other'
END as ball_result
FROM deliveries;

select * from deliveries_v02;


-- drop table deliveries_v02;

-- 12.Write a query to fetch the total number of boundaries and dot


balls
select ball_result, count (*) from deliveries_v02 where ball_result
<>'1,2,3' group by ball_result order by count desc;
select ball_result, count (*) from deliveries_v02 group by ball_result;

-- 13.Write a query to fetch the total number of boundaries


scored by each team select batting_team,count(*) from
deliveries_v02 where ball_result = 'boundary' group by
batting_team order by count;
-- 14.Write a query to fetch the total number of dot balls
bowled by each team select bowling_team, count(*) from
deliveries_v02 where ball_result = 'dot' group by
bowling_team
order by count;

-- 15.Write a query to fetch the total number of dismissals


by dismissal kinds select dismissal_kind, count (*) from
deliveries where dismissal_kind <> 'NA' group by
dismissal_kind
order by count desc;

-- 16.Write a query to get the top 5 bowlers who conceded maximum


extra runs
select distinct "bowler" as Bowler, count (extra_runs) as
"Max_extra_runs" from deliveries group by bowler
order by
"Max_extra_runs"
desc limit 5;
-- select bowler, count (extra_runs) from deliveries group by bowler
-- order by count desc limit 5;

-- 17.Write a query to create a table named deliveries_v03 with all


the columns of deliveries_v02 table and
-- two additional column (named venue and match_date) of venue
and date from table matches create table deliveries_v03 AS
SELECT a.*, b.venue, b.match_date from deliveries_v02 as a left
join (select max(venue) as venue, max(date) as match_date, id from
matches group by id) as b on a.id = b.id;
-- select * from deliveries_v03;
-- 18.Write a query to fetch the total runs scored for each venue and
order it in the descending order of
-- total runs scored.
select sum (total_runs) as Venue_runs,(select venue from
matches where deliveries.id = matches.id) from deliveries
group by venue order by "venue_runs" desc;
-- select venue, sum(total_runs) as runs from deliveries_v03 group by
venue order by runs desc;

-- 19.Write a query to fetch the year-wise total runs scored at Eden


Gardens and order it in the descending order
-- of total runs scored.
select extract(year from match_date) as IPL_year, sum(total_runs) as
runs from deliveries_v03 where venue = 'Eden Gardens' group by
IPL_year order by runs desc;

-- 20.Get unique team1 names from the matches table, you will notice
that there are two entries for
-- Rising Pune Supergiant one with Rising Pune Supergiant and
another one with Rising Pune Supergiants.
-- Your task is to create a matches_corrected table with two additional
columns team1_corr and team2_corr containing
-- team names with replacing Rising Pune Supergiants with Rising
Pune Supergiant. Now analyse these newly created
-- columns. select
distinct team_1
from matches;
create table matches_corrected as select *, replace(team_1, 'Rising
Pune Supergiants', 'Rising Pune
Supergiant') as team1_corr
, replace(team_2, 'Rising Pune Supergiants', 'Rising Pune Supergiant')
as team2_corr from matches;
select distinct team1_corr from matches_corrected;

-- 21.Create a new table deliveries_v04 with the first column as


ball_id containing information of match_id, inning,
-- over and ball separated by 8-9 (For ex. 335982-1-0-1 match_id-
inning-over-ball) and rest of the columns same as
-- deliveries_v03)
create table deliveries_v04 AS SELECT
concat(id,'-',inning,'-',over,'-',ball) as ball_id, * from deliveries_v03 ;
-- select * from deliveries_v04;

-- 22.Compare the total count of rows and total count of distinct


ball_id in deliveries_v04; select * from deliveries_v04 limit 20;
select count(distinct ball_id) from
deliveries_v04; select count(*)
from deliveries_v04;

-- 23.Create table deliveries_v05 with all columns of deliveries_v04


and an additional column for row number
-- partition over ball_id. (HINT : row_number() over
(partition by ball_id) as r_num) drop table deliveries_v05;
create table deliveries_v05 as select *, row_number() over (partition
by ball_id) as r_num from deliveries_v04;
select * from deliveries_v05;

-- 24.Use the r_num created in deliveries_v05 to identify instances


where ball_id is repeating.
-- (HINT : select * from deliveries_v05
WHERE r_num=2;) select * from
deliveries_v05 WHERE r_num=2;

-- 25.Use subqueries to fetch data of all the ball_id which are


repeating.
-- (HINT: SELECT * FROM deliveries_v05 WHERE ball_id in
(select BALL_ID from deliveries_v05 WHERE r_num=2);
SELECT * FROM deliveries_v05 WHERE ball_id in (select
BALL_ID from deliveries_v05 WHERE r_num=2);

Project Snapshot
Applications

It is a form of business intelligence which helps in solving specific


problems and challenges. For instance, through data analytics, an e-
commerce company can track customer behaviour and use the
insights to improve the entire experience.

Future Work & Conclusion

Now that we have analyzed our data, the last step is to draw
your conclusions. Conclusions summarize whether the experiment or
survey results support or contradict the original hypothesis. Teams
should include key facts from your team's background research to
help explain the results.

6. Challenges Faced
6. Challenges Faced (Optional)

While the Internshala SQL for Data Analytics Training provided a


comprehensive learning experience, there might have been moments
when you encountered specific challenges. Here are some potential
hurdles you could have faced, along with strategies to overcome
them:

 Grasping Complex Concepts: Some advanced SQL concepts


like joins or window functions can initially appear intricate. To
address this, you could:
o Break Down the Concepts: Segment the concept into

smaller, more manageable parts. Focus on understanding


each element individually before attempting to integrate
them.
o Practice Makes Perfect: Solidify your understanding by

actively practicing with the challenging concepts. Utilize


additional resources like online tutorials or practice
problems specifically designed for those topics.
 Managing Time Constraints: The training might have
involved balancing lectures, exercises, and assignments with
other commitments. Effective time management can help
overcome this hurdle:
o Create a Schedule: Develop a dedicated study schedule,

allocating specific times for learning the material,


practicing exercises, and completing assignments.
o Prioritize Tasks: Identify the most important tasks for
each learning session and focus on completing them
efficiently.
Additionally, you can personalize this section by reflecting on any
specific challenges you encountered during the training. Briefly
describe the difficulty you faced and the strategies you employed
to overcome it. This demonstrates your perseverance and
problem-solving skills.

7. Overall Experience and Benefits: A Rewarding Journey into


the World of SQL

The Internshala Summer Training program on SQL for Data


Analytics proved to be a rewarding and enriching experience. The
well-structured learning approach, combining informative video
lectures, engaging exercises, and well-designed assignments, provided
a solid foundation for building my SQL skillset.

Throughout the training, I gained a strong understanding of the core


functionalities of SQL, including data manipulation with DML
(INSERT, UPDATE, DELETE), data retrieval and filtering with
WHERE and ORDER BY clauses, and data aggregation with GROUP
BY and HAVING clauses. This proficiency allows me to confidently
extract, manipulate, and analyze data stored within relational
databases.

The training also exposed me to advanced SQL concepts, potentially


including joins for combining data from multiple tables, window
functions for complex calculations within result sets, and stored
procedures and functions for code reusability. While these might not
have been covered in all iterations of the program, understanding
them equips me for more intricate data analysis tasks in the future.
Beyond the technical expertise, the training fostered valuable
problem-solving skills. Through the exercises and assignments, I
learned to approach data analysis challenges strategically, formulate
effective SQL queries, and interpret the retrieved results to extract
meaningful insights.

Overall, the Internshala SQL for Data Analytics Training has


significantly enhanced my ability to interact with and analyze data.
This newfound skillset will prove to be an asset in various fields,
including data science, business intelligence, and any domain that
relies on data-driven decision making. I am confident that this training
has equipped me to take the next step in my journey towards a data-
driven career path.

Here are some additional benefits you can consider mentioning:


 Enhanced employability: Highlighting how your newfound

SQL skills can strengthen your resume and increase your


marketability in data-driven job markets.
 Increased confidence in data analysis: Emphasize how the

training boosted your confidence in approaching and tackling


data analysis challenges.
 Foundation for further learning: Briefly mention how this

training serves as a stepping stone for exploring more advanced


data analysis concepts and tools in the future.
While the Internshala SQL for Data Analytics Training provided a
comprehensive learning experience, there might have been moments
when you encountered specific challenges. Here are some potential
hurdles you could have faced, along with strategies to overcome
them:

 Grasping Complex Concepts: Some advanced SQL concepts


like joins or window functions can initially appear intricate. To
address this, you could:
o Break Down the Concepts: Segment the concept into

smaller, more manageable parts. Focus on understanding


each element individually before attempting to integrate
them.
o Practice Makes Perfect: Solidify your understanding by

actively practicing with the challenging concepts. Utilize


additional resources like online tutorials or practice
problems specifically designed for those topics.
 Managing Time Constraints: The training might have

involved balancing lectures, exercises, and assignments with


other commitments. Effective time management can help
overcome this hurdle:
o Create a Schedule: Develop a dedicated study schedule,

allocating specific times for learning the material,


practicing exercises, and completing assignments.
o Prioritize Tasks: Identify the most important tasks for

each learning session and focus on completing them


efficiently.
Additionally, you can personalize this section by reflecting on any
specific challenges you encountered during the training. Briefly
describe the difficulty you faced and the strategies you employed
to overcome it. This demonstrates your perseverance and
problem-solving skills.

8. Conclusion: Empowering Myself with the Power of SQL for


Data Analysis

The Internshala Summer Training on SQL for Data Analytics marked


a significant milestone in my journey towards a data-driven career.
This comprehensive program equipped me with the essential skills to
navigate the world of relational databases and unlock the power of
SQL for data analysis.
Throughout the training, I gained a thorough understanding of the
core functionalities of SQL, including data manipulation, retrieval,
filtering, and aggregation. I can now confidently extract, manipulate,
and analyze data stored within relational databases, empowering me
to transform raw data into valuable insights.

The training delved deeper, potentially introducing me to advanced


SQL concepts like joins, window functions, stored procedures, and
functions. This broadened my horizon and equipped me to tackle
more intricate data analysis tasks in the future.

Beyond the technical expertise, the program fostered valuable


problem-solving skills. I learned to approach data analysis challenges
strategically, formulate effective SQL queries, and interpret results to
extract meaningful insights.

The knowledge and skills acquired through this training have


significantly enhanced my ability to work with data. This newfound
proficiency in SQL will serve as a stepping stone for further
exploration of data analysis tools and techniques. I am confident that
my SQL skillset will be a valuable asset as I pursue a career in data
science, business intelligence, or any field that hinges on data-driven
decision making.

In conclusion, the Internshala Summer Training on SQL for Data


Analytics proved to be an invaluable investment in my professional
development. By mastering the language of data, I am now equipped
to unlock a world of possibilities in the exciting realm of data
analysis.

You might also like