SQL Server Data Analysis: Exploring Accident Database

  Рет қаралды 26,452

Mehrdad Dehghan

Mehrdad Dehghan

Күн бұрын

.
I used Microsoft SQL Server Management Studio to conduct exploratory data analysis for the accident database. During this project, I tried to run SQL queries ranging from simple to most challenging and complex to answer 8 different questions.
-------------------------------------------------------------------
You can find each part of this video here:
🕒 00:00 Introduction to Project
🕒 00:49 Data
🕒 03:46 Create Database and Tables
🕒 05:26 Question 1
🕒 08:53 Question 2
🕒 11:18 Question 3
🕒 15:19 Question 4
🕒 22:17 Question 5
🕒 28:01 Question 6
🕒 30:32 Question 7
🕒 37:29 Question 8
-------------------------------------------------------------------
To find the files of this video, please use the below link:
🔶 github.com/M3hrdad-Dehghan/SQ...
🔶 mehrdaad.wixsite.com/portfoli...
-------------------------------------------------------------------
Also, you can find more videos in the below playlist(s):
Based on Topic:
✔️ • Data Analysis
✔️ • Data Visualization
✔️ • Machine Learning
✔️ • Statistics
✔️ • Other Topics
Based on Tools:
✔️ • SQL
✔️ • Python
✔️ • Power BI
✔️ • Excel
-------------------------------------------------------------------
I'd be pleased if you see my profile:
🔶 github.com/M3hrdad-Dehghan
🔶 / mehrdad-dehghan

Пікірлер: 58
@safakv60
@safakv60 4 ай бұрын
Thank you for all your efforts on the channel.
@RafiqulIslam-dv9cu
@RafiqulIslam-dv9cu 11 ай бұрын
Fantastic Work Boss.
@mehrdad_analyst
@mehrdad_analyst 11 ай бұрын
Thanks
@piyushsingh6084
@piyushsingh6084 9 ай бұрын
you are just amazing.!! thanks
@mehrdad_analyst
@mehrdad_analyst 9 ай бұрын
Thanks
@aliwow7874
@aliwow7874 9 ай бұрын
Thank you for doing such a great tutorial 🎉
@mehrdad_analyst
@mehrdad_analyst 9 ай бұрын
It's my pleasure
@Sajid10109
@Sajid10109 5 ай бұрын
Very use full project Dear
@mehrdad_analyst
@mehrdad_analyst 5 ай бұрын
thank you
@sasitpiasai8152
@sasitpiasai8152 6 ай бұрын
Is a good SQL tutorial for beginner. thank you
@mehrdad_analyst
@mehrdad_analyst 6 ай бұрын
definitely
@PujiPamungkas-ko4db
@PujiPamungkas-ko4db 10 ай бұрын
I just found your works. 👍
@mehrdad_analyst
@mehrdad_analyst 9 ай бұрын
Thanks
@uzi110
@uzi110 5 ай бұрын
question 5 easy Understanding Query select WeatherConditions , count(WeatherConditions) as TotalAccident from accident where Severity = 'Fatal' group by WeatherConditions order by TotalAccident desc
@user-ye5mt8ee9e
@user-ye5mt8ee9e Ай бұрын
thanks bro
@ashutoshpandey9105
@ashutoshpandey9105 3 ай бұрын
Hey, nice tutorial, I am doing this for my portfolio project. DO I need to save the results of queries as well? Or just codes will be enough?
@mehrdad_analyst
@mehrdad_analyst 3 ай бұрын
No need to save the query since all queries are stored in a log.
@manojparida9040
@manojparida9040 6 ай бұрын
Good job.... While i import the vehicle file in MySQL, it shows row imported failed due to data truncated for column accidentindex at row 1 and 1265.
@mehrdad_analyst
@mehrdad_analyst 6 ай бұрын
Try Microsoft SQL Management Studio instead of MySQL
@navaneethcm8377
@navaneethcm8377 6 ай бұрын
First of all, thank you for the video. I am new at this and was searching for a project to do to learn more and start building a resume. But I have encountered a problem while importing the flat file 'vehicle'. It says - The given value 'No' of type String from the data source cannot be converted to type bit for Column 4 [LeftHand]. (Microsoft.Data.SqlClient) Failed to convert parameter value from a String to a Boolean. (Microsoft.Data.SqlClient) Edit- I got it
@mehrdad_analyst
@mehrdad_analyst 5 ай бұрын
Did you use the correct version of SQL Server?
@navaneethcm8377
@navaneethcm8377 5 ай бұрын
@@mehrdad_analyst yeah, I think I didn't check allow null variables for a column the first time I guess
@radhikareddydasari491
@radhikareddydasari491 4 ай бұрын
Thank you for doing this analysis, Also can you please let me know how can i download this data, i tried to download github links provided above but i don't have find the data sets
@mehrdad_analyst
@mehrdad_analyst 4 ай бұрын
Hi. In this link there are two CSV files. you can download them and import in your SQL management application (MySQL or MS SQL). github.com/M3hrdad-Dehghan/SQL/tree/main/Exploratory_Data_Analysis_of_Vehicle_Accident_by_SQL
@dapoadimula3167
@dapoadimula3167 5 ай бұрын
The left-hand column in the vehicle table cannot be imported with the bit or tinyint datatype. Please note that I am using SQL Server Management Studio (SSMS) for my database
@mehrdad_analyst
@mehrdad_analyst 4 ай бұрын
please make sure you don't change the data type of variables
@simonoganga9535
@simonoganga9535 11 ай бұрын
Hey bro., Is this the one you told me about you are working on? Let me check it out then I'll give you my feedback. But I already know it's amazing
@mehrdad_analyst
@mehrdad_analyst 11 ай бұрын
Hi Simon. It's just about the EDA project using T-SQL. You can find it a useful project for dealing with data to explore more about it. After running EDA on data, you are ready to use one of the BI tools to visualize data to gain more insights. By the way, I planned to run the E-2-E project, but I was tasked with a huge workload. So, I try to publish more videos on different topics.
@araijeahmed6127
@araijeahmed6127 5 ай бұрын
hi ; in question 4 ; can we use this query SELECT AgeGroup, COUNT([AccidentIndex]) AS 'Total Accident', AVG([AgeVehicle]) AS 'Average Year', CASE WHEN [AgeVehicle] BETWEEN 0 AND 5 THEN 'New' WHEN [AgeVehicle] BETWEEN 6 AND 10 THEN 'Regular' ELSE 'Old' END AS AgeGroup GROUP BY AgeGroup; thanks
@mehrdad_analyst
@mehrdad_analyst 5 ай бұрын
Yes. You can use any query as long the query works and shows the same result. Just use your creativity 👍
@watitwanasaka3208
@watitwanasaka3208 4 ай бұрын
Used that one too, but include a group for nulls
@ikeibe452
@ikeibe452 9 ай бұрын
What generates such data in real life? I'm just asking to expand my knowledge
@mehrdad_analyst
@mehrdad_analyst 9 ай бұрын
This data is sourced from the UK Traffic Data Agency and represents genuine information for a particular timeframe.
@siddartha1328
@siddartha1328 9 ай бұрын
Hey i have a small doubt the excel sheet contains dates in different formats and i am not sure how to change them into single format can you help me thanks in advance.
@mehrdad_analyst
@mehrdad_analyst 9 ай бұрын
Please send me an email and explain your problem
@vasilli3273
@vasilli3273 5 ай бұрын
is it normal to have AccidentIndex with scientific values (Like 2.02E+10)?
@mehrdad_analyst
@mehrdad_analyst 5 ай бұрын
Accident Index is indeed a label in terms of data type. However, it is important to note that the values displayed in a column may not always correspond to the data type. For example, even though Accident Index is shown as a number, it is actually a label that is a combination of letters and numbers. Therefore, it is highly recommended to change the data type accordingly. It is worth mentioning that in the video, the accident index appears to be a scientific number, but it is actually a label.☺
@vasilli3273
@vasilli3273 5 ай бұрын
@@mehrdad_analyst in my case about 110.00 rows of AccidentIndex data converted to scidentific value in the procces of importing data to sql server database. which makes almost impossibble to analyse the data because we can't relate vehicleID's and AccidentIndex. I trided to change data types but doesn't work. couldn't figure out a solution.
@hendraheryawan4393
@hendraheryawan4393 5 ай бұрын
do you have a data what u can practice too
@mehrdad_analyst
@mehrdad_analyst 5 ай бұрын
hi. you can see my GitHub in the description of videos
@hendraheryawan4393
@hendraheryawan4393 5 ай бұрын
ok thank you @@mehrdad_analyst
@user-yi9xl5br7h
@user-yi9xl5br7h 4 ай бұрын
Data analyst always work with Excel data only can please clarify my doubt
@mehrdad_analyst
@mehrdad_analyst 4 ай бұрын
Excel is an application that is used for storing structured data. However, there are other tools available for storing structured data, such as databases, Access, and others. Apart from structured data, there are semi-structured data types, such as websites, and non-structured data types, such as voice, text, and video, that have their own storage systems. The most important step in data management is to understand the data itself, while tools and techniques are secondary.
@Naif-so8yk
@Naif-so8yk 5 ай бұрын
what is the purpose of accidentIndex in this query?
@mehrdad_analyst
@mehrdad_analyst 5 ай бұрын
we could use this variable as n unique (primary key) for accident identifier.
@abrahammoruti5967
@abrahammoruti5967 3 ай бұрын
I have a hard time understanding subquiry
@joasjonson9123
@joasjonson9123 3 ай бұрын
Do you have the source of the data?
@mehrdad_analyst
@mehrdad_analyst 3 ай бұрын
Unfortunately, it was on my local system and after changing system it was gone
@Behappy-ft5yc
@Behappy-ft5yc 3 ай бұрын
is this good for resume , please tell me guys
@mehrdad_analyst
@mehrdad_analyst 3 ай бұрын
yes sure. I tried to put most common syntax in this video
@thummaluruharish1929
@thummaluruharish1929 9 ай бұрын
Can u share the dataset
@mehrdad_analyst
@mehrdad_analyst 9 ай бұрын
Just use the link in the description. (GitHub)
@ivanko-nebo
@ivanko-nebo 3 ай бұрын
I guess you didn't exactly answer the question 7. You just counted severity but wasn't you supposed to find out how many Fatal, Serious and Slight accidents were for example when people are Commuting to/from work? Maybe this query would answer it better: SELECT v.JourneyPurpose, a.Severity, COUNT(a.AccidentIndex) AS Accidents_Count FROM Car_Accidents..accident AS a JOIN Car_Accidents..vehicle AS v ON a.AccidentIndex = v.AccidentIndex GROUP BY v.JourneyPurpose, a.Severity ORDER BY 2 ASC, 3 DESC
@Ganeshay-996
@Ganeshay-996 6 ай бұрын
Why most youtuber are using Ms Ms SQL server....why not use oracle SQL tool
@mehrdad_analyst
@mehrdad_analyst 6 ай бұрын
Maybe just because it's easier to walk through. However, in real work condition, it doesn't matter which database management tool is being used
@Ganeshay-996
@Ganeshay-996 6 ай бұрын
@@mehrdad_analyst thanks for sharing guidance and knowledge
@mehrdad_analyst
@mehrdad_analyst 6 ай бұрын
@@Ganeshay-996 it's my pleasure
Get Familiar with Microsoft Azure Database | Part One
19:15
Mehrdad Dehghan
Рет қаралды 455
Learn How to Become a Healthcare Data Analyst with This Guide
15:18
Data Wizardry
Рет қаралды 32 М.
одни дома // EVA mash @TweetvilleCartoon
01:00
EVA mash
Рет қаралды 3,6 МЛН
【獨生子的日常】让小奶猫也体验一把鬼打墙#小奶喵 #铲屎官的乐趣
00:12
“獨生子的日常”YouTube官方頻道
Рет қаралды 54 МЛН
Лизка заплакала смотря видео котиков🙀😭
00:33
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47
Recursion | DSA in Javascript #9
31:55
theCodingClub
Рет қаралды 3
SQL Explained in 100 Seconds
2:23
Fireship
Рет қаралды 700 М.
Exploratory Data Analysis with Pandas Python
40:22
Rob Mulla
Рет қаралды 405 М.
I learned SQL for data analytics in 15 days | From Scratch
4:10
Techie Saumya
Рет қаралды 427 М.
Elon Musk fires employees in twitter meeting DUB
1:58
GeoMFilms
Рет қаралды 11 МЛН
одни дома // EVA mash @TweetvilleCartoon
01:00
EVA mash
Рет қаралды 3,6 МЛН