Group By and Having Clause in SQL | SQL Tutorial in Hindi 9

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น • 466

  • @durgeshjaiswal1233
    @durgeshjaiswal1233 ปีที่แล้ว +14

    @rishab Mishra- i came here to give you thanks....mai jaha jaha pe fasta hu chhoti chhoti meri issues ar question hote hai vo bhi aap cover kar rhe (vo jo apne bola na unique value wale column ko ku nhigrp kiya jata hai ar ye kuchh logo ka doubt hota hai mai us category se belong karta hu....dil jit liya sir apne...hatsoff

  • @vaibhavv475
    @vaibhavv475 11 หลายเดือนก่อน +13

    FROM: Specifies the table or tables from which to retrieve data.
    WHERE: Filters the rows based on specifie conditions.
    GROUP BY: Groups the result set by one or more columns.
    HAVING: Filters the grouped rows based on specified conditions.
    SELECT: Specifies the columns to be included in the result set.
    ORDER BY: Sorts the result set based on specified columns.
    LIMIT: Restricts the number of rows in the result set.

    • @baki_1205
      @baki_1205 6 หลายเดือนก่อน

      Chat Gpt 😆

  • @_empire_dk
    @_empire_dk ปีที่แล้ว +50

    1--Select * from 'table name '
    Where limit =4
    Group by 'table name '
    Having count (amount)>=3
    Order by DESC

    • @dhamalpratik
      @dhamalpratik 6 หลายเดือนก่อน +5

      Wrong

    • @sachueditz788
      @sachueditz788 3 หลายเดือนก่อน +2

      SELECT ROUND(SUM(AMOUNT ),2) AS TOTAL AMOUNT
      FROM TABLE_NAME
      WHERE AMOUNT >=100
      GROUP BY PAYMENT_MODE
      HAVING TOTAL_AMOUNT >1000
      ORDER BY TOTAL_AMOUNT ASC;

    • @randomvideo7891
      @randomvideo7891 3 หลายเดือนก่อน

      +
      Limit 10​@@sachueditz788

    • @digvijaysingh9636
      @digvijaysingh9636 12 วันที่ผ่านมา

      limit?

  • @mahimaas1944
    @mahimaas1944 ปีที่แล้ว +12

    sir you are doing a great job , Its more than what you think .

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  ปีที่แล้ว +6

      Glad you liked it ✅️ happy to help 😊

    • @prasaddeore3048
      @prasaddeore3048 3 หลายเดือนก่อน +1

      @@RishabhMishraOfficial please make a playlist on PowerBI & advance excel

    • @the_person111
      @the_person111 2 หลายเดือนก่อน

      @@RishabhMishraOfficial sir great job 👍👍👍

  • @aakashyadav825
    @aakashyadav825 2 ปีที่แล้ว +26

    Sir order is : Select, From, Where, Group By, Having, Order By, Limit.
    Thank you Sir for the awesome explanation of Group By clause.! 🙌

    • @laxmipriya9379
      @laxmipriya9379 ปีที่แล้ว +12

      This is order of writing. But order of execution is --from, join, where, group by, having, select, order by, limit

    • @priyanshugupta6815
      @priyanshugupta6815 8 หลายเดือนก่อน +1

      bhai job lag gyi???

    • @sahiltomar5767
      @sahiltomar5767 3 หลายเดือนก่อน

      @@laxmipriya9379 Thanks

    • @beyondmind-jb3yc
      @beyondmind-jb3yc หลายเดือนก่อน +1

      @@laxmipriya9379 yes , that's why he is using "count(amount) >= 2" instead of " total >= 2" because having is before the select statement

    • @laxmipriya9379
      @laxmipriya9379 หลายเดือนก่อน

      @@beyondmind-jb3yc yes👍

  • @prajjwalsingh3991
    @prajjwalsingh3991 ปีที่แล้ว +53

    SELECT(columns/everything) FROM(Table name)
    WHERE(Apply condition)
    GROUP BY(Columns name you want to group) AS (Column header name)
    HAVING(apply condition) [For more condition use OPERATORS]
    ORDER BY (Column header name with ASC/DESC)
    LIMIT(Count of rows you want)

  • @mirzailyas7196
    @mirzailyas7196 ปีที่แล้ว +8

    1.SELECT(column_name)
    2.FROM(table_name)
    3.WHERE(Condition)
    4.GROUP BY(column_name)
    5.HAVING(condition)
    6.ORDER BY(ASC OR DESC)
    7.LIMIT(How many rows you need in number)

    • @AsimaIqbal101
      @AsimaIqbal101 10 หลายเดือนก่อน +1

      from will execute first

    • @AsimaIqbal101
      @AsimaIqbal101 10 หลายเดือนก่อน +1

      FROM
      JOINS
      WHERE
      GROUP BY
      HAVING
      SELECT
      DISTINCT
      ORDER BY
      LIMIT
      (This is not for the given question)

  • @niteshsrivastava9272
    @niteshsrivastava9272 8 หลายเดือนก่อน +4

    select column_name(s)
    from table_name
    where = condition(s)
    group by column_name(s)
    having condition(s)
    order by
    limit

  • @YashSingh-xs5yj
    @YashSingh-xs5yj 11 หลายเดือนก่อน +6

    Thank you so much, this tutorial is so easy to understand!

  • @muhammadhunaid20
    @muhammadhunaid20 ปีที่แล้ว +7

    From (Table to get Base data)
    Where (Filters the Base data)
    Group By (Aggregate the Base Data)
    Having (Filters the Aggregate Data)
    Select (Returns the Final Data)
    Order By: (Sorts the Final Data)
    Limit: (Limits the Data to a Row Count)

  • @MrYash-cs9nk
    @MrYash-cs9nk 8 หลายเดือนก่อน +4

    ! select*from table name
    where limit+4
    group by (table name) As Total
    having count ( amount) >=4

    • @RishavKapil-ct4io
      @RishavKapil-ct4io 5 หลายเดือนก่อน

      galat h bhaii WHERE ke sath condition ayega LIMIT condition thori h koi

  • @amaansayeed6614
    @amaansayeed6614 11 หลายเดือนก่อน +3

    1. FROM + JOIN
    2. WHERE
    3. GROUP BY
    4. HAVING
    5. SELECT
    6. ORDER BY
    7. LIMIT + OFFSET

  • @TheAccurateCoder
    @TheAccurateCoder ปีที่แล้ว +34

    1.SELECT(column_name)
    2.FROM(table_name)
    3.WHERE(condition)
    4.GROUP BY(column_name)
    5.HAVING(condition)
    6.ORDER BY(ASC or DESC)
    7.LIMIT(number :- how much row you want) ;

    • @academics4155
      @academics4155 5 หลายเดือนก่อน

      first it's FROM which shows from which table you wanna get the data from

  • @abdullahkhalid5627
    @abdullahkhalid5627 2 หลายเดือนก่อน +1

    The possible sequence will be:
    SELECT > FROM > LIMIT > WHERE > GROUP BY > HAVING > ORDER BY....
    As per my understanding, LIMIT and ORDER BY both have the margin to be used after HAVING and before WHERE...
    Thanks

  • @paraswaral5742
    @paraswaral5742 2 หลายเดือนก่อน +2

    Order of execution "from -> where -> group by -> having -> select -> order by -> limit"

  • @SurajKumar-vl7ch
    @SurajKumar-vl7ch หลายเดือนก่อน +1

    select -> from -> where -> limit -> groupby-> having-> order by

  • @kuldipmahale9762
    @kuldipmahale9762 4 หลายเดือนก่อน +1

    You explained it really well. I was looking for a clear explanation for this topic.

  • @sonirana4281
    @sonirana4281 ปีที่แล้ว +3

    Select->From -> where -> group by -> having -> order by -> limit

    • @Radha4408
      @Radha4408 8 หลายเดือนก่อน +2

      Correct order of execution is FROM > WHERE > GROUP BY > HAVING > SELECT > DISTINCT > ORDER BY > LIMIT.😊 this is the correct order😊

  • @daughterofanartist7223
    @daughterofanartist7223 หลายเดือนก่อน +1

    Ma Sha Allah, bhai bhot acha explain kiya apne 👍👍👍

  • @rajeshsplasher2635
    @rajeshsplasher2635 4 หลายเดือนก่อน +1

    select mode, sum(amount) as total, count(amount) as count
    from payment
    where amount>=30
    group by mode
    having count(amount)>=0
    order by count
    limit 5

  • @Sbk_Tech
    @Sbk_Tech ปีที่แล้ว +1

    1). SELECT: it specify the column you need,
    2). FROM: this statement use to pinpoint the table, wheres your desired data,
    3). WHERE: it allowing only those data that meets specific conditions to pass throgh,
    4). GROUP BY: Organizing the data based on specified columns,
    5). HAVING: If your data is grouped HAVING allow for futher improvements,
    6). ORDER BY: It Sequencing or arrange the results in Ascendng or descending order,
    7). LIMIT: It specify the number of rows there you want to display.

  • @Radha4408
    @Radha4408 8 หลายเดือนก่อน +1

    HAVING clause can be used before or after GROUP BY clause (but we should prefer after group by clause) 😊

  • @naveensharma9436
    @naveensharma9436 2 หลายเดือนก่อน +1

    Order of execution :- From > Group by>Having> Select>Order by for this query, Otherwise From>Join>Where>Groupby>Having>Select>Distinct> Orderby>Limit

  • @chiragchauhan987
    @chiragchauhan987 3 หลายเดือนก่อน +1

    Thanks for the good explanation of group by and having clause sir.

  • @aloke2359
    @aloke2359 หลายเดือนก่อน +2

    it is all ready in right order bro.

  • @udaybhaskar-q2r
    @udaybhaskar-q2r 10 หลายเดือนก่อน +2

    hello Rishabh good video i had some problems in understanding it, but now it's totally clear. coming to the question the order is as follows from-where-select-groupby-having-orderby-limit

  • @MashfikulIslam
    @MashfikulIslam 10 ชั่วโมงที่ผ่านมา

    select>from>where>group by>having >order by>limit

  • @pinky_ponky-h5o
    @pinky_ponky-h5o 19 วันที่ผ่านมา +1

    Thankyou sir i understood everything thank you very much

  • @dineshgurnule6327
    @dineshgurnule6327 หลายเดือนก่อน +1

    SQL execution sequence will be :-
    from-> where-> group by-> having-> select-> order by-> limit

  • @Rupakdas-t7t
    @Rupakdas-t7t หลายเดือนก่อน +1

    Select > From> Where > Limit > Group By > Having > Order By

  • @babypal7484
    @babypal7484 ปีที่แล้ว +2

    1.SELECT(column_name) FROM(table_name)WHERE(condition)GROUP BY(column_name)HAVING(condition)ORDER BY(ASC or DESC)LIMIT 3 ;

  • @IrfanKhan-wv8rh
    @IrfanKhan-wv8rh ปีที่แล้ว +1

    Excellent sir. Nice teaching method

  • @dhillonexotictravel
    @dhillonexotictravel 3 หลายเดือนก่อน +1

    Order of execution is --from, join, where, group by, having, select, order by, limit

  • @thebakchodwines
    @thebakchodwines หลายเดือนก่อน +1

    Select mode,sum(amount) from payment
    Where amount>=300
    Group by mode
    Having sum(amount)
    Order by sum( amount)
    Limit 3;

  • @Hassan-wq9up
    @Hassan-wq9up ปีที่แล้ว +1

    SELECT(column name)
    FROM(table-name)
    WHERE(condition)
    GROUP BY(column-name)
    HAVING(condition)
    ORDER BY(ascending or descending)
    LIMIT( no or anything else u need accordingly)..........

  • @harshkannaujia9914
    @harshkannaujia9914 หลายเดือนก่อน +2

    select * from customer
    where city = 'lucknow'
    limit 3

  • @ArunKumar-gx8iv
    @ArunKumar-gx8iv 7 หลายเดือนก่อน +1

    select ->from->where->group>having->order by ->limit

    • @ArunKumar-gx8iv
      @ArunKumar-gx8iv 7 หลายเดือนก่อน

      SELECT column1, column2, ...
      FROM table_name
      WHERE condition
      GROUP BY column_name
      HAVING condition
      ORDER BY column_name ASC|DESC
      LIMIT offset, row_count;

  • @nishakhatri9096
    @nishakhatri9096 2 หลายเดือนก่อน +2

    thankyou sir for explaining........

  • @tusharsonparote5840
    @tusharsonparote5840 6 หลายเดือนก่อน +1

    Order or execution - FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> ORDER BY -> LIMIT

  • @DeadlyGaming407
    @DeadlyGaming407 8 หลายเดือนก่อน +1

    7:20 sir apne to funny krdiya idhar🤣 mast padhate ho aap
    btw order is
    select from
    where
    group by
    having
    order by
    limit

  • @hk0153
    @hk0153 2 ปีที่แล้ว +2

    Order of execution in SQL:
    Select, from, where, group by, having, order by and limit

  • @rushilapurohit8678
    @rushilapurohit8678 9 หลายเดือนก่อน +1

    Correct order
    FROM> WHERE> GROUP BY> HAVING > SELECT > DISTINCT > LIMIT

  • @rashikaverma5261
    @rashikaverma5261 9 วันที่ผ่านมา

    bhaiya amazing explanation

  • @TravelWithAjaj
    @TravelWithAjaj ปีที่แล้ว +1

    From>where>Group by> having >select >order by >limit

  • @pankajydadv9918
    @pankajydadv9918 4 หลายเดือนก่อน

    FROM- WHERE- Group by- HAVING- Select- Order by- LIMIT
    It is the correct format for query execution

  • @aasmohammad6332
    @aasmohammad6332 ปีที่แล้ว +2

    Select "any column or full table" from 'table_name'
    Where 'apply any condition'
    Group By 'any column use table if have repeated value'
    Having 'applying any condition'
    order by 'use for sort the data'
    Limit 'how many rows we need'

  • @ghilbadshaw9377
    @ghilbadshaw9377 ปีที่แล้ว +1

    1 select
    2from
    3 where
    4 group by
    5 having
    6 order by
    7 limits

  • @shrutisant
    @shrutisant 7 หลายเดือนก่อน +1

    Amazing playlist for SQL 😊

  • @atulsharma5700
    @atulsharma5700 ปีที่แล้ว +3

    Order of execution in SQL:
    Select
    FROM
    WHERE
    GROUP BY
    HAVING
    ORDER BY
    LIMIT

    • @AsimaIqbal101
      @AsimaIqbal101 10 หลายเดือนก่อน

      FROM will Execute first then where , Group by , Having , then select upto so on

  • @saurabhshukla4965
    @saurabhshukla4965 3 หลายเดือนก่อน +1

    Select > FROM > WHERE > GROUP BY > HAVING > Order By > LIMIT

  • @akshatalanjewar3056
    @akshatalanjewar3056 9 หลายเดือนก่อน +1

    SELECT (columns name which you want to fetch /*) FROM table_name
    WHERE (Condition)
    GROUP BY (Column_name) AS (give a ALISAS to your col_name)
    HAVING (Condition)
    ORDER BY ( Column_name ASC/DESC)
    LIMIT (Give number of rows you want to show)

  • @SurajKumar-ec3jy
    @SurajKumar-ec3jy 2 หลายเดือนก่อน +1

    THE ORDER OF EXECUTION IN SQL =-
    FROM, WHERE,GROUP BY, HAVING , SELECT , ORDER BY , LIMIT

  • @kg_codes
    @kg_codes ปีที่แล้ว +54

    Correct order of execution is FROM > WHERE > GROUP BY > HAVING > SELECT > DISTINCT > ORDER BY > LIMIT.

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  ปีที่แล้ว +18

      Correct 👍

    • @thunderedits8133
      @thunderedits8133 11 หลายเดือนก่อน +13

      how is correct brother? SELECT should be first.

    • @krishnakushwah8966
      @krishnakushwah8966 10 หลายเดือนก่อน +2

      Select ko bad main kyu rakha hai

    • @Radha4408
      @Radha4408 8 หลายเดือนก่อน +6

      ​@@krishnakushwah8966we write it first but it work after having clause

    • @arjunnayal2818
      @arjunnayal2818 3 หลายเดือนก่อน

      Ye answer to Samaj he nahi aaya😢... koi explain kar sakta hai ise

  • @ShubhamPatil..
    @ShubhamPatil.. ปีที่แล้ว +4

    Thank You SIR

  • @sayan_malik7
    @sayan_malik7 11 หลายเดือนก่อน +1

    select
    from
    group by
    having count
    order by total

  • @suyashawasthi4240
    @suyashawasthi4240 ปีที่แล้ว +11

    Same order as given in Problem : Select,From,Where,Group By,Having,Order By,Limit

    • @baki_1205
      @baki_1205 6 หลายเดือนก่อน

      wrong

  • @sanjaychouhan8019
    @sanjaychouhan8019 3 หลายเดือนก่อน +1

    SELECT >FROM> WHERE> GROUP BY> HAVING >ORDER BY> LIMIT

  • @SK-di6ti
    @SK-di6ti ปีที่แล้ว +1

    Select *
    From tablename
    Where condition
    Group by column name
    Having condition
    Order by col name asc r dsc
    Limit

  • @abhishekshukla4750
    @abhishekshukla4750 ปีที่แล้ว +1

    Select- column
    From - table name
    Where - condition apply
    Group by - column name
    Having - condition
    Order by - asc / desc
    Limit -

  • @kinderjoy112
    @kinderjoy112 ปีที่แล้ว +1

    1.select from
    2.where
    3.group by
    4.having
    5.order by

  • @rushikeshphanse228
    @rushikeshphanse228 ปีที่แล้ว +1

    Order of execution is as follows:
    From
    Where
    Group By
    Having
    select
    Order By
    limit

  • @muskangupta6868
    @muskangupta6868 ปีที่แล้ว +1

    Select column name from table
    Where condition
    Group by coulmn name
    Having condition
    Order by asc,desc
    Limit numbers

  • @abhirupsen765
    @abhirupsen765 5 หลายเดือนก่อน

    Execution order - from -> where -> order by -> having -> select -> order by -> limit

  • @danyalasif8322
    @danyalasif8322 หลายเดือนก่อน +1

    select gender, count(age) as total from book2 where age>= 20
    group by gender
    HAVING length(total)>=2
    order by (total) asc limit 1;

  • @aishwaryabhosale2756
    @aishwaryabhosale2756 ปีที่แล้ว +1

    Thank you for helpful information

  • @Karan-yg5qc
    @Karan-yg5qc 3 หลายเดือนก่อน +1

    Select Column_names
    From Table_name
    Where condition
    Group by column_name
    Having condition
    Order by column_name asc/dsc
    limit no.(5/10...) ;

  • @himanshurawat2398
    @himanshurawat2398 ปีที่แล้ว +7

    Order of Execution:-
    SELECT
    FROM
    WHERE
    LIMIT
    GROUP BY
    HAVING
    ORDER BY
    Amazing Content 👍🏻.

  • @amritrajawat3083
    @amritrajawat3083 10 หลายเดือนก่อน +1

    SELECT mode , COUNT (amount) AS lana
    FROM payment
    WHERE amount>0
    GROUP BY mode
    HAVING COUNT (amount)>=3
    ORDER BY lana DESC
    LIMIT 4

  • @vickypawar999
    @vickypawar999 5 หลายเดือนก่อน +1

    SELECT column_name
    FROM table_name
    WHERE condition
    GROUP BY column_name
    HAVING column_name
    ORDER BY ASC/DESC
    LIMIT count of rows

  • @PrashantJadhav-l9c
    @PrashantJadhav-l9c ปีที่แล้ว +1

    Select Column_name
    From table_name
    Where condition
    group by column_name
    having condition
    order by column_name

  • @ArtCorner...
    @ArtCorner... ปีที่แล้ว +7

    FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT

  • @orahichal
    @orahichal ปีที่แล้ว +2

    SELECT * FROM
    WHERE condition(s)
    GROUP BY column_name()
    HAVING condition(s)
    ORDER BY column_name
    LIMIT

  • @apunriddle
    @apunriddle 2 หลายเดือนก่อน +1

    👍▶️ very helfull concept

  • @rajaram3976
    @rajaram3976 ปีที่แล้ว +1

    1. FROM
    2. WHERE
    3. GROUP BY
    4. HAVING
    5. SELECT
    6.ORDER BY
    7. LIMIT

  • @pawangaur1407
    @pawangaur1407 5 หลายเดือนก่อน

    Order of execution in SQL : from>where>group by>having>select>Order by>Limit

  • @yuvrajmishra5108
    @yuvrajmishra5108 6 หลายเดือนก่อน +1

    FROM > WHERE> GROUP BY > HAVING BY> SELECT > ORDER BY > LIMIT

  • @theentertainmentworld3310
    @theentertainmentworld3310 ปีที่แล้ว +1

    Perfect video for this topic,❤

  • @rahulchauhan1769
    @rahulchauhan1769 ปีที่แล้ว +1

    The difference between the having and where clause in SQL is that the where clause cannot be used with aggregates, but the having clause can

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  ปีที่แล้ว +1

      You can use that, have shown in this video

    • @rajeevmeshram4710
      @rajeevmeshram4710 11 หลายเดือนก่อน

      Where clause ko aggregate function ke sath use kar sakte hai. If you want ki aggregate function sirf specific conditions par apply ho..

  • @bhagwatdhavale6091
    @bhagwatdhavale6091 10 หลายเดือนก่อน +1

    Gr8 bro
    Super explaination

  • @jdas7
    @jdas7 ปีที่แล้ว

    Aap ne sahi sequence me likhe hai ji..
    Select - from - where - group by - having - order by - limit

    • @Radha4408
      @Radha4408 8 หลายเดือนก่อน

      Correct order of execution is FROM > WHERE > GROUP BY > HAVING > SELECT > DISTINCT > ORDER BY > LIMIT.

  • @pudiraja2018
    @pudiraja2018 6 หลายเดือนก่อน

    select mode, count(amount) as total from payment
    group by mode
    having count(amount) >= 3 and count(amount)

  • @NeilBarsha_YT
    @NeilBarsha_YT 2 หลายเดือนก่อน +1

    SELECT mode, amount
    FROM payment
    WHERE amount > 40
    GROUP BY mode
    HAVING amount >= 60 AND amount

  • @kanishkadedha
    @kanishkadedha ปีที่แล้ว +1

    Select */anything from (table name ) where - order by - limit - group by - having

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  ปีที่แล้ว

      It's incorrect, you can watch my playlist on sql interview questions and answers there i have shared detailed answers

  • @divyanshisharma4054
    @divyanshisharma4054 ปีที่แล้ว +1

    from --> where --> group by --> having --> order by --> limit --> select

  • @pallavitewari724
    @pallavitewari724 ปีที่แล้ว +1

    SELECT,FROM,WHERE,LIMIT,GROUPBY,HAVING,ORDERBY is the order of execution. Thanks

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  ปีที่แล้ว

      It's incorrect. For a detailed explanation, watch my playlist on sql interview questions and answers

  • @geetaghadmode4606
    @geetaghadmode4606 2 หลายเดือนก่อน +1

    Select -from- where- order by- limit- group by- having

  • @avinashshelar2026
    @avinashshelar2026 ปีที่แล้ว +1

    Select cl_name from t_n
    Where condition
    Group by cl_name
    Having condition
    Order by cl_name
    Limit;

  • @khajaumairuddin5753
    @khajaumairuddin5753 5 หลายเดือนก่อน

    select mode,count(amount) from payments
    Where mode = 'Cash'
    group by mode
    having count(amount)

  • @AiWithDanish
    @AiWithDanish ปีที่แล้ว +1

    SELECT mode, COUNT(amount) AS total
    FROM purchase
    GROUP BY mode
    HAVING COUNT(amount) >= 2 AND COUNT(amount) < 4
    ORDER BY total DESC

  • @priyajadhav28
    @priyajadhav28 ปีที่แล้ว +1

    order of execution
    1.FROM
    2.WHERE
    3.GROUP BY
    4.HAVING
    5.ORDER
    6.LIMIT
    7.SELECT

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  ปีที่แล้ว

      For correct answer pls watch my playlist on sql interview questions and answers

  • @rajanair79
    @rajanair79 หลายเดือนก่อน +1

    Well explained

  • @Mohsin_Naqvi7
    @Mohsin_Naqvi7 4 หลายเดือนก่อน

    select mode, count(amount) as total
    from empinfoo
    group by mode
    having COUNT(amount) > = 4
    order by total asc

  • @2023aabaad-ny7bs
    @2023aabaad-ny7bs ปีที่แล้ว

    1) Select
    2) From
    3) Where
    4) Limit
    5) Group by
    6) Having
    7) Order by

  • @Mohduzair-t7h
    @Mohduzair-t7h 8 หลายเดือนก่อน +1

    FROM: The tables or views mentioned in the FROM clause are accessed, and any necessary joins are performed to combine them.
    WHERE: The rows are filtered based on the conditions specified in the WHERE clause. Rows that meet the conditions are retained, while others are discarded.
    GROUP BY: If a GROUP BY clause is present, the rows are then grouped into sets based on the values of the specified columns.
    HAVING: If a HAVING clause is present, it filters the groups produced by the GROUP BY clause based on the specified conditions.
    SELECT: The SELECT clause is applied to the rows and columns that remain after the previous steps. Expressions, functions, and transformations specified in the SELECT clause are performed at this stage.
    ORDER BY: If an ORDER BY clause is present, the result set is sorted according to the specified criteria.
    LIMIT: If a LIMIT clause is present, it restricts the number of rows returned by the query.

    • @Mohduzair-t7h
      @Mohduzair-t7h 8 หลายเดือนก่อน

      please correct me if i am wrong

  • @sandipanmajumder9419
    @sandipanmajumder9419 ปีที่แล้ว +2

    SELECT column_name(1) AS alias FROM table_name
    WHERE condition(s)
    GROUP BY column_name(1)
    HAVING condition
    ORDER BY column_name(1) / alias asc/desc
    LIMIT ;

  • @sandeepkalwar604
    @sandeepkalwar604 ปีที่แล้ว +2

    Order of execution:
    SELECT, FROM, GROUP BY, HAVING, ORDERBY, LIST

  • @chetankumar6679
    @chetankumar6679 หลายเดือนก่อน

    select>count >from>groupby>having>orderby

  • @khateebahmad862
    @khateebahmad862 7 หลายเดือนก่อน +1

    correct order is- from, where, group by, having, select, order by, limit

  • @ruturajkshirsagar8640
    @ruturajkshirsagar8640 ปีที่แล้ว +1

    from > Where > Group by > Having >select > order by >Limit

    • @AnuragRawat01
      @AnuragRawat01 ปีที่แล้ว +1

      Can you explain why select isn't at starting?

  • @sheetalmishra1258
    @sheetalmishra1258 ปีที่แล้ว +1

    Select column name
    From table
    Where cond
    Group by
    Having
    Order by desc or asc
    Limit 1or 2;