Oracle SQL Practical question | Oracle SQL to concatenate previous row value continuously

preview_player
Показать описание
Oracle SQL Practical question | Oracle SQL to concatenate previous row value continuously
--------------------------------------------------------------
This channel is for learning Oracle SQL, PLSQL, DATABASE concepts, MYSQL, ETL, Mongo DB, Python,UNIX and related technologies.
--------------------------------------------------------------

--------------------------------------------------------------

--------------------------------------------------------------

--------------------------------------------------------------
About Myself:
----------------------
I am Siva, [LEARN | CODE | TRAIN | SHARE].
Being in IT industry for more than 12+ years.
In my day to day job, I work with database technologies including Oracle, Java, Python, MongoDB, talend and UNIX.
I am passionate about "DATA", coding & training.
In my spare time, I teach database technologies , ETL etc.
I am very glad that you are reading my Profile, and I value your time as well as mine.
Looking forward to see you in my videos

--------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

create table t (col1 varchar2(1), col2 number);

insert into t values('A', 1);
insert into t values('A', 2);
insert into t values('A', 3);
insert into t values('B', 100);
insert into t values('B', 200);
insert into t values('B', 300);
insert into t values('B', 400);
insert into t values('B', 500);

commit;

select col1, col2, substr(agg, 1, instr(agg||', ', ', ', 1, occ)-1) expected_output
from (
select col1, col2,
listagg(col2, ', ') within group(order by col2) over(partition by col1) agg,
row_number() over(partition by col1 order by col2) occ
from t);

select col1, col2, ltrim(substr(s, instr(s, ', ', 1, s1)), ', ') expected_output
from (
select col1, col2, ', '||(listagg(col2, ', ') within group(order by col2 desc) over(partition by col1)) s,
row_number() over(partition by col1 order by col2 desc) s1
from t)
order by 1, 2;

SivaAcademy
Автор

Happy new year Siva sir.. Huge respect for you and your efforts.. You are a great teacher

nk
Автор

Wish you happy new Sir
Nice video it's very helpful to us.. Thanks

aruvamadhu
Автор

Hi, will you please do a video on interview question for oracle sql and plsql(experienced candidate). How they ask in this skill

ushathoughts
Автор

Happy New Year bro! I would like to tell you, I've placed an intermediate to expert level of experience. Special credits goes to you obviously. Really thanks bro! All video's are excellent and lot's of way to solve over it. 👌👍

ashokrider
Автор

Happy New year Siva Sir, Great video on Jan-1 -2021

satishthirumal
Автор

Happy new year shiva. Please put videos on production support related questions

bharathipandian
Автор

Happy New year siva sir and every subscribers

thirunavukarasu
Автор

shiva explain us a project end to end with stored procedure and triggers ...so that we can practice and learn...

himanish
Автор

Hello! Every video you post is very useful to me and not for me i m sure. Too bad you don't post more often. I wish you a better 2022 !!!Happy new year!!!

florincopaci
Автор

Bro Please explain about Data grain on DWH and how to define a grain in fact table

ManojKumar-rrgc
Автор

Sir 1 question ....
We have one table contains some positive and negative number and we need to count how many positive and negative number ....And it should populate as below
Positive_num | Negative_num
2 |3

Freakouts_and_found_Insane
Автор

Hi sir my question is
I have two tables one is the old_tab and new_tab is there.
When condition is matche update the old_tab values to new_tab values
If in case condition Is not matched insert the old_tab values in new_tab

Please write PLSQL program through cursors only, I hope your respond ASAP... my friends and me waiting on this video.. Thanks Sir

aruvamadhu
Автор

Hi Siva,

Q. Why Oracle doesn't introduce the functionality like sync pks on change of respective pkb automatically?

mukeshchitte
Автор

post video to print prime number, fibo.. series and regular expressions concept

kabildev
Автор

We have 4 numbers like 8000 9000 8000 9000..using this numbers we have to write the select statement for checking count of 8000..Can we pass the multiple number as a input in select statement.?
Please explain this question sir..

shalinis
Автор

Hello sir I need 'I love my India' in
I
Love
My
India
May I get this query plz...

arjun
Автор

Happy new year Siva ... I like the idea appending comma before instr..

Happy new Year ..

PG

pradeepgonaguntla
welcome to shbcf.ru