8 Tips & Pointers to solve SQL Complex Queries ! (BONUS Tip Included !)

Поделиться
HTML-код
  • Опубликовано: 25 июл 2024
  • In this video, we discuss some SQL tips to solve SQL Complex Queries.
    Chapters #
    0:00 Introduction
    0:57 RANKING DATA
    2:00 RUNNING / ROLLING SUM
    2:50 PREV / NEXT VALUES
    5:21 HIERARCHY - ALL LEVELS
    6:18 IDENTIFY PAIRS
    7:20 SEQUENCES OF DATA
    8:58 CONDITIONAL COUNT
    10:47 GENERATE DATA
    Please find below the links to the related video tutorials -
    Nth highest salary -
    • SQL Interview Question...
    Recursive CTE
    • SQL | Recursive CTE | ...
    Hierarchies
    • SQL Interview - Employ...
    • SQL Interview Question...
    Self Join
    • SQL Query | How to gen...
    Conditional Count
    • SQL | How to implement...
    Running Totals
    • SQL Query | How to cal...
    • SQL Query | How to cal...
    Prev/Next Records
    • SQL Query | Compare wi...
    • SQL Query | Compare mo...
    Must Do Data Analytics Certifications -
    Google Data Analytics Professional Certificate
    imp.i384100.net/OR37oQ
    Google Advanced Data Analytics Professional Certificate
    imp.i384100.net/eK1WmQ
    Please do not forget to like, subscribe and share.
    For enrolling and enquiries, please contact us at
    Website - knowstar.org/
    Instagram - / learn.knowstar
    Facebook - / knowstartrainings
    Linkedin - www.linkedin.com/company/know...
    Email - learn@knowstar.org

Комментарии • 22

  • @LearnatKnowstar
    @LearnatKnowstar  Год назад +3

    For practicing more SQL Complex Queries, you can check out the below video -
    ruclips.net/video/E_6haE_10eE/видео.html

  • @kristyowens2284
    @kristyowens2284 Год назад +1

    You provided very good tips. Waiting for the video on advanced tips!

  • @oyelowotoyyib925
    @oyelowotoyyib925 Год назад +1

    Thanks for your videos thus far. If you don't have already, can you do a video explaining the difference/similarity between cte and sub-query(if any) and which one is better?

    • @LearnatKnowstar
      @LearnatKnowstar  Год назад +1

      That’s a great suggestion. Thank you. We will plan a video soon.

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

    Thank you for this video, specially for bonus tip... ✌️❤

  • @Ganeshay-996
    @Ganeshay-996 11 месяцев назад

    Wowowowow very helpful tutorial

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

    Helpful, can u please provide script to create tables and data along with all videos?? this will be more helpful to go along with your solutions. Thanks

    • @LearnatKnowstar
      @LearnatKnowstar  Год назад +1

      Sure. We try to post the scripts with most of the videos.

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

    thanks for the video. can you make the one for beginners, for instance how to get all fridays /sundays/mondays etc. of a year in sql? Thanks in advance🌹. 08.06.2023, 19:58

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

    Hi,
    I have questions, can you please give the solution for this.
    We have office data related punch in and punch out data.
    As a employee we used to go out from office multiple times for tea, snacks etc.
    We need to find out time duration of a employee in a working day , how much time he was out of office.
    Table Office:
    Columns:
    EmployeeId, starttimeofoffice,endtimeofoffice,punchIn, Punchout

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

    Going forward plz make video on nested charindex and what does +1 and -1 in charindex means

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

    Table A (Student ID, Student Name, Student Age)
    table B (Student ID, Student Class, Student Section)
    Select Student Name, Student Class, Student Section where Student Age between 16 to 18 and Student Section is 'D' How to find out Mam ?

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

    Hindi me banao jayada veiw hoga

    • @LearnatKnowstar
      @LearnatKnowstar  Год назад +1

      We might plan Hindi videos in the future. Thank you.

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

      @@LearnatKnowstar thanks madam but ek request h ki every step like crystal clear karwayega and why and where we use which type of approach so kindly please make Hindi regarding complex SQL

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

      Thanks for response madam

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

    Hello Mam, I have some questions that were asked in an interview, if possible please make a video on these questions
    Question: 1
    SELECT c.CustomerName, COUNT(o.OrderID) AS NumOrders
    FROM Customers c
    LEFT JOIN Orders o ON c.CustomerID = o.CustomerID
    GROUP BY c.CustomerName
    HAVING COUNT(o.OrderID) > 10
    ORDER BY NumOrders DESC;
    This query returns the names of all customers who have placed more than 10 orders, along with the number of orders they have placed. However, there is an issue with this query that needs to be resolved.
    Can you identify the issue with this query and provide a solution to fix it?
    Question: 2
    Here's an example of a SQL query with some issues that need to be resolved:
    SELECT *
    FROM Orders
    WHERE OrderDate >= '2022-01-01' AND OrderDate 1000
    ORDER BY o.OrderDate DESC;
    Can you identify the issue with this query and provide a solution to fix it?
    Question 4:
    Consider the following scenario:
    You are working on a database application that stores sales data for a retail company. The database has two tables: "Sales" and "Products". The "Sales" table contains over 1 million rows and has the following columns: SaleID, ProductID, SaleDate, SaleAmount. The "Products" table contains over 10,000 rows and has the following columns: ProductID, ProductName, ProductCategory, UnitPrice.
    Write a SQL query that retrieves the total sales amount for each product category for the current year. The query should return the following columns: ProductCategory, TotalSalesAmount.
    Query should be optimizefor performance also.
    .

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

      Thank you for sharing the questions. We will plan to answer them soon.