Sidra Codes
Sidra Codes
  • Видео 38
  • Просмотров 19 982
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',...
Просмотров: 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 - Part II
Просмотров 132Год назад
SQL Interview Questions - Part II
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

Комментарии

  • @chandanpatra1053
    @chandanpatra1053 4 дня назад

    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.

  • @user-uh7uw3no1w
    @user-uh7uw3no1w 20 дней назад

    Madam please don't stop because of Views.ur knowledge is >>>

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 19 дней назад

      Thank you for this comment. I will continue. 🥹

  • @Hope-xb5jv
    @Hope-xb5jv 24 дня назад

    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😇

  • @tehminaarshman3374
    @tehminaarshman3374 24 дня назад

    Very well explained

  • @SidraCodes-LetsGo
    @SidraCodes-LetsGo 25 дней назад

    Pls like and subscribe if you like this video and want to see more. 😊

  • @dravikrish7323
    @dravikrish7323 Месяц назад

    Excellent business scenario

  • @KalponaUDDIN-jt5fr
    @KalponaUDDIN-jt5fr 2 месяца назад

    Hi please can you send me the data you've used please

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 25 дней назад

      Hello it is in description of part 2. Thank you.

  • @dawitworku821
    @dawitworku821 2 месяца назад

    Very helpful. Than you.

  • @ranaharoonkhan
    @ranaharoonkhan 4 месяца назад

    can we do col a + col b as col c and then use lag function on col c it self ??

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 25 дней назад

      Yes, i can provide example in an upcoming video. Thank you.

  • @Pankaj-Verma-
    @Pankaj-Verma- 4 месяца назад

    Thanks.

  • @johnnysunrocket8618
    @johnnysunrocket8618 5 месяцев назад

    San Francisco 49Ers beat down the Lions back into their dens!!! Superbowl Sunday Champions Look out Chiefs 😅😅😅

  • @osoriomatucurane9511
    @osoriomatucurane9511 6 месяцев назад

    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

  • @Info-God
    @Info-God 6 месяцев назад

    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.

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 6 месяцев назад

      Thank you for your kind words. Your suggestion is noted.. I will for sure in the upcoming videos.

  • @paolodimartino241
    @paolodimartino241 7 месяцев назад

    'promosm'

  • @senp4i186
    @senp4i186 7 месяцев назад

    thank you you are really good at teaching whenever I see your vid I know I will learn something new :3

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 7 месяцев назад

      Thank you. Your appreciation means a lot. :⁠-⁠)

  • @senp4i186
    @senp4i186 9 месяцев назад

    I went from very basic knowledge of joins to quite advanced in this vid <3 thank you

  • @senp4i186
    @senp4i186 9 месяцев назад

    Thank you for the video I'm so new to this and I managed to understand most of it ❤ it is Hella helpful thanks

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      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. ☺️

    • @senp4i186
      @senp4i186 9 месяцев назад

      @@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

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      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.

    • @senp4i186
      @senp4i186 9 месяцев назад

      @@SidraCodes-LetsGo yes it did thank you so much <3

  • @kranthi121p4
    @kranthi121p4 9 месяцев назад

    Great...I want how to do joins in sub queries ....pls do

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      For sure, I can do that in upcoming videos. Stay tuned. ☺️🙏

  • @vaibhav2347
    @vaibhav2347 9 месяцев назад

    I really like the way how you solve queries...

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      Thank you. I will be posting more. Your support is highly appreciated.

    • @vaibhav2347
      @vaibhav2347 9 месяцев назад

      @@SidraCodes-LetsGo how can I connect with you..

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      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.

  • @raviff4646
    @raviff4646 9 месяцев назад

    Which application you are using

  • @vaibhav2347
    @vaibhav2347 9 месяцев назад

    Pretty good....

  • @aminmansourfar875
    @aminmansourfar875 9 месяцев назад

    VERY GOOD

  • @SantoshYadav-hj8kv
    @SantoshYadav-hj8kv 9 месяцев назад

    But mam you didnt told how join is faster than subquery.

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      Hello, thank you watchung the video. I will be uploading new video with more explanation. Pls stay tuned.

  • @kranthi121p4
    @kranthi121p4 9 месяцев назад

    Great

  • @emmanueloyase1011
    @emmanueloyase1011 9 месяцев назад

    Thanks for the practical course, can i have the bulk data so i can insert into the ecommerce database.

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 9 месяцев назад

      Hello, absolutely. I will be uploading the data soon in the description and I will send you a note via comment as well.

  • @sriramulavenkatakrishnakar9615
    @sriramulavenkatakrishnakar9615 10 месяцев назад

    Dont stop because of views

  • @SidraCodes-LetsGo
    @SidraCodes-LetsGo 10 месяцев назад

    Pls Watch this in 1080P Setting

  • @shivarajkumar4494
    @shivarajkumar4494 10 месяцев назад

    can you please give create Table and Insert scripts ?

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 10 месяцев назад

      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! :)

    • @shivarajkumar4494
      @shivarajkumar4494 10 месяцев назад

      Thank you so much @@SidraCodes-LetsGo

  • @shannuteja5082
    @shannuteja5082 10 месяцев назад

    good content ... keep going 👍👍

  • @SidraCodes-LetsGo
    @SidraCodes-LetsGo 10 месяцев назад

    Most asked question in interviews.

  • @MyCodingDiary
    @MyCodingDiary 10 месяцев назад

    Your videos are my go-to resource whenever I get stuck on a coding problem. Thank you!

  • @MyCodingDiary
    @MyCodingDiary 10 месяцев назад

    Your videos have been instrumental in my programming journey. Thank you for sharing your expertise!

  • @SidraCodes-LetsGo
    @SidraCodes-LetsGo 10 месяцев назад

    Pls watch the video on 1080p settings.

  • @SidraCodes-LetsGo
    @SidraCodes-LetsGo 10 месяцев назад

    Pls watch the video in 1080p settings. :)

  • @SidraCodes-LetsGo
    @SidraCodes-LetsGo 10 месяцев назад

    pls watch this in 1080p for better quality. :)

  • @brunavogt278
    @brunavogt278 Год назад

    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

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 7 месяцев назад

      Pls watch my new video on brand new customer . You'll find the answer for your question.

  • @papajhones3931
    @papajhones3931 Год назад

    Nice

  • @hamidmghazi
    @hamidmghazi Год назад

    Thanks

  • @somethingunique7351
    @somethingunique7351 Год назад

    Amazing tutorial, thanks a lot

  • @farhansaiyed5415
    @farhansaiyed5415 Год назад

    This is clear cut and to the point. Keep the videos coming.

  • @tehminaarshman3374
    @tehminaarshman3374 Год назад

    Very informative 👍

  • @NMWarsi
    @NMWarsi 2 года назад

    Well explained!

  • @farhansaiyed5415
    @farhansaiyed5415 2 года назад

    Very informative, I am always excited for these videos.

  • @tehminaarshman3374
    @tehminaarshman3374 2 года назад

    Wow informative😊

  • @wingli4113
    @wingli4113 2 года назад

    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!

    • @SidraCodes-LetsGo
      @SidraCodes-LetsGo 2 года назад

      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. :)

    • @wingli4113
      @wingli4113 2 года назад

      @@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...

  • @somethingunique7351
    @somethingunique7351 2 года назад

    Thanks for another detailed and informative tutorial, appreciate it

  • @farhansaiyed5415
    @farhansaiyed5415 2 года назад

    This video is really helpful.

  • @somethingunique7351
    @somethingunique7351 2 года назад

    Thanks a lot for the amazing explanation and making it easier to learn sql, appreciate it

  • @somethingunique7351
    @somethingunique7351 2 года назад

    Well explained and easy to follow tutorial. Thanks

  • @saramushtaq6409
    @saramushtaq6409 2 года назад

    Super helpful. Thank you