SQL Data Analysis Interview Question #38/100 | SQL Challenge | SQL Tutorials | Flipkart Interview

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

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

  • @user-gq6cg3ls7f
    @user-gq6cg3ls7f Месяц назад +1

    with cte as(
    select *,
    Dense_Rank() over (partition by DAY(day) order by amount desc ) DR
    from Transactions_Sat
    )
    select transaction_id from cte where DR=1 order by transaction_id

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

    select transaction_id
    from(
    select *, dense_rank() over(partition by date(day) order by amount desc) as dr
    from Transactions
    )
    where dr = 1
    order by transaction_id

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

    with cte as(
    select *,max(amount) over(partition by day(day)) as dt from transactions)
    select transaction_id from cte where amount=dt order by transaction_id
    another approach

    • @sportsofficial6374
      @sportsofficial6374 Месяц назад +1

      Wrong

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

      @@sportsofficial6374 bro kindly runs this code in MySQL it will definitely work .
      Thanks & regards

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

      ​@@sportsofficial6374 bro kindly run this code in MySQL it will definitely work .
      Thanks & regards

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

      @@sportsofficial6374 bro kindly run this code in mysql it will definetly work

  • @MEB_Aryan
    @MEB_Aryan Месяц назад +1

    bro can u plz reduce the price of sql datasets or can u plz make a tutorial on how to scrap the required data

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

      Hi mate!
      Please dm instagram.com/zero_analyst/

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

    Im new to sql. Why didn't you specify the where ranks =1 in the original select statement. Why did you have to do a sub-query first?

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

      This column is created using window function so you cannot use it filter. You have to save the results in a table using sub query or CTE than you can use the column to filter it!

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