SQL Interview Question - Solution (Part - XXV) |

  Рет қаралды 3,129

MeanLifeStudies

MeanLifeStudies

Күн бұрын

Пікірлер: 20
@hrishi2839
@hrishi2839 20 күн бұрын
this concept was new to me, thanks man
@lakshmanlee3579
@lakshmanlee3579 2 ай бұрын
hi sir i used this code for solving this problem: code: with recursive cte as ( select item,1 as total from items union all select distinct c.item,total + 1 as total from cte c join items i on c.total < i.item_count and c.item = i.item ) select * from cte order by item,total
@joemoneyweather4437
@joemoneyweather4437 3 ай бұрын
With cte as ( select item,item_count from items union all select item,item_count-1 from cte where item_count>=2 ) select * from cte order by item,item_count
@srinivasulum414
@srinivasulum414 2 ай бұрын
with cte as ( select item,item_count,1 as num from items union all select item,item_count,num+1 from cte where num+1
@torrentdownloada
@torrentdownloada 3 ай бұрын
with cte as(select item,item_count from items union all select item,item_count-1 from cte where item_count>1) select * from cte order by item,item_count
@syedirfanali8043
@syedirfanali8043 3 ай бұрын
Sir i am beginner in SQL Request to post beginner tutorial 🙏🏻please sir I want to learn SQL
@vishnugottipati9373
@vishnugottipati9373 3 ай бұрын
with cte as( select item,item_count from items1 union all select cte.item,cte.item_count-1 from cte inner join items1 i on cte.item=i.item where cte.item_count>1 ) select item,item_count from cte order by item,item_count
@VARUNTEJA73
@VARUNTEJA73 3 ай бұрын
with r_cte as (select item,1 as number,item_count from items union all select item,number+1,item_count from r_cte where number
@vishalsvits
@vishalsvits 3 ай бұрын
with cts AS ( select item , item_count, 1 AS Ctn From items union all select c.item , c.item_count ,c.ctn+1 from items i join cts c on c.item_count =i.item_count and i.item_count>c.Ctn ) select item, ctn From cts order by item
@manjunatharalikatti2202
@manjunatharalikatti2202 6 күн бұрын
;WITH CTE AS ( SELECT item,1 AS cnt,item_count FROM items UNION ALL SELECT item,cnt+1 AS cnt,item_count from CTE WHERE cnt < item_count ) SELECT * FROM CTE order BY item,cnt,item_count
@nd9267
@nd9267 3 ай бұрын
;with cte as ( select item, sum(item_count) total_count, 1 as level from items_item group by item union all select item, total_count, level+1 from cte where level+1
@MeanLifeStudies
@MeanLifeStudies 3 ай бұрын
Looks more optimized than my solution
@motiali6855
@motiali6855 2 ай бұрын
My Solution: with recursive cte as ( select item,item_count, 1 as level from items union all select cte.item,cte.item_count-1, (level+1) as level from cte where cte.item_count>1 ) select cte.item,cte.item_count from cte order by cte.item,cte.item_count;
@hrishi2839
@hrishi2839 20 күн бұрын
got more clearity from your query thbxxx
@arjundev4908
@arjundev4908 3 ай бұрын
WITH RECURSIVE CTE AS(SELECT *, 1 AS JUM FROM ITEMS UNION ALL SELECT C.ITEM,C.ITEM_COUNT-1, JUM+1 AS LEVEL FROM CTE AS C JOIN ITEMS AS I ON C.item_count = I.item_count WHERE C.ITEM_COUNT > 1) SELECT * FROM CTE ORDER BY 1;
@harshitsalecha221
@harshitsalecha221 2 ай бұрын
WITH recursive cte1 AS (SELECT item,item_count,1 as number FROM items UNION ALL SELECT item,item_count,number+1 FROM cte1 WHERE number
@shwetas4388
@shwetas4388 3 ай бұрын
Data analyst interview prep krva do
@MeanLifeStudies
@MeanLifeStudies 3 ай бұрын
Okay
@noobvirago3874
@noobvirago3874 3 ай бұрын
PL SQL Developer Tool With cte as ( Select level as lvl from dual connect by level =lvl;
@MubarakAli-qs9qq
@MubarakAli-qs9qq 2 ай бұрын
For me its quite tough cte kaha se padu
UUID vs INT: What’s Better For Your Primary Key?
9:40
Database Star
Рет қаралды 56 М.
这是自救的好办法 #路飞#海贼王
00:43
路飞与唐舞桐
Рет қаралды 55 МЛН
Random Emoji Beatbox Challenge #beatbox #tiktok
00:47
BeatboxJCOP
Рет қаралды 16 МЛН
EY SQL Interview Question | Medium-level
21:33
Nishtha Nagar
Рет қаралды 6 М.
SQL Interview Question | Use Different Methods to Find the Nth Highest Salary
14:04
SQL interview Questions and Answers | 🔥 Must Watch | Most Asked SQL Questions
17:42
Can You Pass This Excel Interview Test?
11:20
Kenji Explains
Рет қаралды 951 М.