![Sidra Codes](/img/default-banner.jpg)
- Видео 38
- Просмотров 19 982
Sidra Codes
Добавлен 13 апр 2022
In my videos I will be sharing simple and easy way to learn and practice SQL and python. Hope you all follow, learn and enjoy!
Advanced SQL: Analyze Customer Behavior and Insights with Real Use Case!
In this video, we will analyze customer behavior using SQL. Learn how to calculate Recency, Frequency, and Monetary as Total Sales (RFM) values from transaction data, identify key customer segments, and gain actionable insights and become a pro to nail your next interview or even solving advanced analytics at work. Perfect for data enthusiasts!
Here is the Insert Record to use for this exercise:
INSERT INTO customer_transactions (CustomerID, InvoiceDate, Quantity, UnitPrice) VALUES
(7, '2024-01-01', 2, 37.00),
(4, '2024-01-02', 1, 41.43),
(8, '2024-01-03', 7, 20.69),
(5, '2024-01-04', 7, 9.33),
(7, '2024-01-05', 8, 47.32),
(10, '2024-01-06', 5, 22.89),
(3, '2024-01-07', 3, 28.30),
(7, '2024-01-08',...
Here is the Insert Record to use for this exercise:
INSERT INTO customer_transactions (CustomerID, InvoiceDate, Quantity, UnitPrice) VALUES
(7, '2024-01-01', 2, 37.00),
(4, '2024-01-02', 1, 41.43),
(8, '2024-01-03', 7, 20.69),
(5, '2024-01-04', 7, 9.33),
(7, '2024-01-05', 8, 47.32),
(10, '2024-01-06', 5, 22.89),
(3, '2024-01-07', 3, 28.30),
(7, '2024-01-08',...
Просмотров: 513
Видео
Advanced SQL: New vs Returning Customers
Просмотров 1917 месяцев назад
In this video, I am showing you New vs Returning (Existing) Customer Count in SQL Server Management Studio. Script for Table and Records are provided below for you to practice along. CREATE TABLE CustomerPurchases ( CustomerID INT, PurchaseDate DATE, SaleAmount DECIMAL(10, 2) ); Insert Records for CustomerPurchases INSERT INTO CustomerPurchases (CustomerID, PurchaseDate, SaleAmount) VALUES (1, ...
SQL Sub Query: Identify Brand New Customers and Sales
Просмотров 1347 месяцев назад
Identify Brand New Customers by using SQL Subquery. Below is the insert records and table for Practice: CREATE TABLE CustomerPurchases ( CustomerID INT, PurchaseDate DATE, SaleAmount DECIMAL(10, 2) ); Insert Records for CustomerPurchases INSERT INTO CustomerPurchases (CustomerID, PurchaseDate, SaleAmount) VALUES (1, '2023-01-01', 100.00), (2, '2023-01-01', 50.00), (3, '2023-01-01', 20.00), (4, ...
Mastering SQL Interview Questions Building Complex Hierarchies
Просмотров 1867 месяцев назад
Map the Company's Employees Hierarchy by using Advanced Recursive Common Table Expression Below is the Script: CREATE TABLE Employee ( EmployeeID INT PRIMARY KEY, Name VARCHAR(100), Position VARCHAR(100), ReportsTo INT ); Inserting sample data INSERT INTO Employee (EmployeeID, Name, Position, ReportsTo) VALUES (1, 'Alice', 'CEO', NULL), (2, 'Bob', 'VP', 1), (3, 'Charlie', 'Director', 2), (4, 'D...
Advanced SQL: Using 1=1 JOIN to Compare Top Sellers & Company's Avg Sales per Transaction
Просмотров 1189 месяцев назад
Ever used 1=1 Join? Discover the power of the 1=1 JOIN technique in this SQL video! In this tutorial, we'll compare individual top sellers (salesperson) against the company's average sales. By the end, you'll understand how to effectively analyze sales per transaction per salesperson and identify standout performances. Below is the script to create and insert tables and records to do a practica...
SQL:Find Employees with the Top Salary in Their Dept Only If It’s above the Company’s Average Salary
Просмотров 1359 месяцев назад
In this video: We will solve 3 advanced SQL Questions: Question 1: Write a SQL to find the 10th highest Employee Salary from Employee Table. Question 2: Find the department with the highest average salary, and have more than three employees. Question 3: Find Employees with the Top Salary in Their Department Only If It’s above the Company’s Average Salary Below are the tables and insert records ...
Advanced SQL - Compare Product Sales for given months And Rank the Products based on Sales Growth
Просмотров 1969 месяцев назад
Episode 9 of 30: We will cover Advanced SQL - Compare Product Sales For Given Months (Get the Sales difference from previous month to current month) And Rank the Products based on Sales Growth. Below is the desired Create Tales Script and Sample Records that you can use to practice this Exercise with me. Pls Note: Below only provides sample records. Add more records if you like. CREATE TABLE pr...
Advanced SQL - Analyzing Product Performance and Cumulative Sales (Running Total)
Просмотров 1219 месяцев назад
Learn Advanced SQL - Analyzing Product Performance and Cumulative Sales (Running Total) . This is Episode 8 of 30 day Advanced SQL series. Below is the tables and records script for this video. So you can create and learn as we go: Creating the 'products' table CREATE TABLE products ( product_id INT PRIMARY KEY, product_name VARCHAR(255), supplier_id INT Assuming this is a foreign key linking t...
Advanced SQL - Find Out Which Supplier Had The Highest Sales Using Common Table Expression
Просмотров 1489 месяцев назад
SQL QUESTION: Find out which suppliers had the highest average sales in January 2023. This is Episode 7 of 30 Days Advanced SQL Series We will be Using these tables: three main tables (sales, products and suppliers I have already provided the insert tables and insert records script below that you can use and practice with me. Let's Dive In. CREATE TABLE products ( product_id INT PRIMARY KEY, pr...
Complex SQL: Find the top 5 actions performed on Apple platforms
Просмотров 1409 месяцев назад
This video solves an Interview Question with table script, records and sql query explanation. Enjoy, like and subscribe for more new videos! Below is a SQL script that creates the events table and inserts some sample data into it. You can run this script in your SQL database management system to create the table and data, and then run the query provided above to test it. Create the 'events' tab...
ADVANCED SQL SCALAR SUBQUERY - Find the Most Recent Order Dates
Просмотров 12610 месяцев назад
Find the Most Recent Order Dates for Customers by using SCALAR SUBQUERY. Simple Yet Powerful Subquery in finding the most recent dates only from customers order history without pulling the whole data. #sqlsubquery #scalarsubquery #SelectSQL #sqlcoding #sql #masterinSQL #DataAnalyst #DataJobs #businessJobs #faanginterviews #programminglife
Advanced SQL - Calculate Revenue Growth by using Lag function
Просмотров 1 тыс.10 месяцев назад
Advanced SQL - Calculate Revenue Growth by using Lag function
Advanced SQL - Common Table Expression CTE to find Top selling Products - Episode 4
Просмотров 10910 месяцев назад
Advanced SQL - Common Table Expression CTE to find Top selling Products - Episode 4
Advanced Analytical SQL(Find Duplicate records) - part 3 of 30
Просмотров 27810 месяцев назад
Advanced Analytical SQL(Find Duplicate records) - part 3 of 30
Advanced SQL (Find Highest Spending Customers) - part 2 of 30
Просмотров 16710 месяцев назад
Advanced SQL (Find Highest Spending Customers) - part 2 of 30
Advanced SQL (Set Up SQL Database)- part 1 of 30
Просмотров 42510 месяцев назад
Advanced SQL (Set Up SQL Database)- part 1 of 30
SQL Analytics Practice for FAANG Interviews Made Easy! - SOLVED QUES!!
Просмотров 10711 месяцев назад
SQL Analytics Practice for FAANG Interviews Made Easy! - SOLVED QUES!!
Workout App: A Quick Guide to Agile Project Planning!
Просмотров 8211 месяцев назад
Workout App: A Quick Guide to Agile Project Planning!
SQL - Get Cumulative Count of Users with total Reset per Month
Просмотров 2,5 тыс.Год назад
SQL - Get Cumulative Count of Users with total Reset per Month
SQL Analytics vs Aggregate function with Example for e.g. find Employees Count by Department.
Просмотров 542Год назад
SQL Analytics vs Aggregate function with Example for e.g. find Employees Count by Department.
SQL interview Questions with Examples - Part i
Просмотров 163Год назад
SQL interview Questions with Examples - Part i
SQL - Find average Salary by department using WHERE and HAVING condition (Interview Question)
Просмотров 674Год назад
SQL - Find average Salary by department using WHERE and HAVING condition (Interview Question)
SQL - Find top 3 departments and percentage of employees over 100k salary
Просмотров 703Год назад
SQL - Find top 3 departments and percentage of employees over 100k salary
SQL JOIN vs SUBQUERY - Which one is faster?
Просмотров 7 тыс.2 года назад
SQL JOIN vs SUBQUERY - Which one is faster?
Find and delete duplicate rows from a table - SQL
Просмотров 2672 года назад
Find and delete duplicate rows from a table - SQL
SQL JOINS - Most asked interview question
Просмотров 4022 года назад
SQL JOINS - Most asked interview question
please provide the create & insert statement in the description box. so that anyone who watch this video can atleast practice instead of only watching.Thanks for bringing such a good level sql question.Keep posting such quality questions.
Madam please don't stop because of Views.ur knowledge is >>>
Thank you for this comment. I will continue. 🥹
I like your spoon feeding teaching 2 years ago i need this kind of teaching but now i learned Sql here only for question Good😇
Thank you and i appreciate it. :)
Very well explained
Pls like and subscribe if you like this video and want to see more. 😊
Excellent business scenario
Hi please can you send me the data you've used please
Hello it is in description of part 2. Thank you.
Very helpful. Than you.
can we do col a + col b as col c and then use lag function on col c it self ??
Yes, i can provide example in an upcoming video. Thank you.
Thanks.
San Francisco 49Ers beat down the Lions back into their dens!!! Superbowl Sunday Champions Look out Chiefs 😅😅😅
Why you hard code on the condition/criteria clause ???? Do we need the condition? Why not Select product, avg(rating) From tables...... Group by 1 Order by 2 desc Limit 5
Just found you. Great examples. The more complex the better. One suggestion. If you can show a user interface (created in anything you feel comfortable-VBA-Excel, CSharp, Python, Access etc having a connection to the database/tables) for data input/entry, with a nice data validation, would be really a break-through.
Thank you for your kind words. Your suggestion is noted.. I will for sure in the upcoming videos.
'promosm'
thank you you are really good at teaching whenever I see your vid I know I will learn something new :3
Thank you. Your appreciation means a lot. :-)
I went from very basic knowledge of joins to quite advanced in this vid <3 thank you
Thank you for the video I'm so new to this and I managed to understand most of it ❤ it is Hella helpful thanks
Glad to hear that. In each video, I am providing insert table and records scripts for you to practice. Pls use that so you can benefit. ☺️
@@SidraCodes-LetsGo I have a question if u could answer I would appreciate it forbthe growth with did we go with the positive and not both positive and negative growth
It depends what you're looking for .. positive shows sales growth and negative usually means decrease in the growth. If you prefer to show both then you can but it has to be defined otherwise it can be interpreted incorrectly. Hope this helps.
@@SidraCodes-LetsGo yes it did thank you so much <3
Great...I want how to do joins in sub queries ....pls do
For sure, I can do that in upcoming videos. Stay tuned. ☺️🙏
I really like the way how you solve queries...
Thank you. I will be posting more. Your support is highly appreciated.
@@SidraCodes-LetsGo how can I connect with you..
For now, best is to send me a message in comments so I can reply. I will try to create a hub to connect in future. Thank you.
Which application you are using
This is SQL Server management studio
Pretty good....
VERY GOOD
But mam you didnt told how join is faster than subquery.
Hello, thank you watchung the video. I will be uploading new video with more explanation. Pls stay tuned.
Great
Thanks for the practical course, can i have the bulk data so i can insert into the ecommerce database.
Hello, absolutely. I will be uploading the data soon in the description and I will send you a note via comment as well.
Dont stop because of views
i watched all previous videos
Pls Watch this in 1080P Setting
can you please give create Table and Insert scripts ?
Hello, I added the create table and insert the records in the description of this video. Pls click on the description and you can copy/paste and execute. Good Luck! :)
Thank you so much @@SidraCodes-LetsGo
good content ... keep going 👍👍
Most asked question in interviews.
Your videos are my go-to resource whenever I get stuck on a coding problem. Thank you!
Your videos have been instrumental in my programming journey. Thank you for sharing your expertise!
Pls watch the video on 1080p settings.
Pls watch the video in 1080p settings. :)
pls watch this in 1080p for better quality. :)
What if I want the distinct count? For exemple, the user id that shows on the first day, count unique on the first day, but it does not count on the others days of that month
Pls watch my new video on brand new customer . You'll find the answer for your question.
Nice
Thanks
Amazing tutorial, thanks a lot
This is clear cut and to the point. Keep the videos coming.
Very informative 👍
Well explained!
Very informative, I am always excited for these videos.
Wow informative😊
Thank you Sidra for this video. Your explantation is very helpful and giving me motivation on learning SQL. May I ask you a favor? Is it possible to have you be my 1:1 SQL tutor? I really hope to have a chance to develop my SQL with you!
Thank you Wing for liking the video. I will be posting more sql videos that are helpful and used in corporate jobs. At this point I can offer to help you with your questions. Pls feel free to reach out for any other SQL questions. I'd be happy to help. :)
@@SidraCodes-LetsGo Thank you for replying me!! May I have your email? I have a coming SQL interview that would be great if you could post more questions or could go through SQL questions if this possible...
Thanks for another detailed and informative tutorial, appreciate it
This video is really helpful.
Thanks a lot for the amazing explanation and making it easier to learn sql, appreciate it
Well explained and easy to follow tutorial. Thanks
Super helpful. Thank you