Oracle SQL Practical question | SQL to Get Last three consecutive status count

preview_player
Показать описание
Oracle SQL Practical question SQL to Get Last three consecutive status count
---------------------------------------------------------------------------------------------------------------------------

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 10 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

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

Hi Sir, every video is very very helpful us thank you very much for keep sharing your knowledge with us keep sharing sir may god bless you sir, i have a request if it is possible please make a video on real-time work environment like
1)How do we get a Requirement,
2)where do we start working
3)how to report our work status from start to end like that please make a video on it sir

devanaidu
Автор

Very beautiful explanation.. #great #wonderful #genius #helpful..

ranajparida
Автор

You are doing very hard and smart work, thanks to hma bolna chaye apko, very very thanks for nice video

sumitbansal
Автор

Nice explaination bro, please make a video on normalization

karthickrajav
Автор

Here are the Inserts to save you few mnts
insert into t1 values(1, 'jun-20', 'red');
insert into t1 values(1, 'may-20', 'red');
insert into t1 values(1, 'apr-20', 'red');
insert into t1 values(1, 'mar-20', 'green');
insert into t1 values(1, 'feb-20', 'red');
insert into t1 values(1, 'jan-20', 'red');


insert into t1 values(2, 'jun-20', 'red');
insert into t1 values(2, 'may-20', 'red');
insert into t1 values(2, 'apr-20', 'red');
insert into t1 values(2, 'mar-20', 'red');
insert into t1 values(2, 'feb-20', 'red');
insert into t1 values(2, 'jan-20', 'green');


insert into t1 values(3, 'jun-20', 'red');
insert into t1 values(3, 'mar-20', 'red');
insert into t1 values(3, 'feb-20', 'red');
insert into t1 values(3, 'jan-20', 'red');

insert into t1 values(4, 'jun-20', 'red');
insert into t1 values(4, 'may-20', 'red');
insert into t1 values(4, 'apr-20', 'green');
insert into t1 values(4, 'mar-20', 'red');
insert into t1 values(4, 'feb-20', 'red');
insert into t1 values(4, 'jan-20', 'red');

insert into t1 values(5, 'jun-20', 'green');
insert into t1 values(5, 'may-20', 'red');
insert into t1 values(5, 'apr-20', 'green');
insert into t1 values(5, 'mar-20', 'red');
insert into t1 values(5, 'feb-20', 'red');
insert into t1 values(5, 'jan-20', 'red');

insert into t1 values(6, 'jun-20', 'red');
insert into t1 values(6, 'mar-20', 'red');
insert into t1 values(6, 'feb-20', 'green');
insert into t1 values(6, 'jan-20', 'red');

haindhavimaddipati
Автор

Hi Sir,
Thanks for making such video

pintukumar-voyd
Автор

Hi Sir,
I have seen all your videos..it's really keep me updated...Can you please give us explaination on Explain Plan, Significance of all the column in explain plan and how cost is calculated...

deepakpatil
Автор

Sir are u conducting any online classes on sql/pl sql ?

imhotepimhotep
Автор

HI Siva, one question - If suppose we need to calculate the pending dues before settlement, after settlement and during settlement, how it will be calculated..e.g. if loan account number '0123' has 3 consecutive dues open itll March (due not paid) for the month of jan, feb and march further he paid the 2 months due at a time on Apr and still 1 previous due is pending and new due open at APR is also pending.. now output should be - pending dues before settlement is 3, pending dues after settlement is 2 (march and apr) and during settlement is 2 (wchich he has paid on apr) like that .

trekkersvalley
Автор

Hi sir, how do I find the last department of the employee

sivap
Автор

Hi Bro, first of all i would like to say thanks to you, the way you are sharing your knowledge with us and explaining the logic to the problems.
I have tried the given requirement in another method, below is the query which is working fine as expected, could you please give me your suggestion is this query degrade the performance.
select id, count(*) from
(
with ds as
(select a.*, dense_rank()over (partition by id order by to_date(reporting_month, 'mon-yy') desc) rnk
from emp_report a
)
select ds.*, row_number() over(partition by id, status order by to_date(reporting_month, 'mon-yy') desc) final from ds
) where rnk=final
group by id having count(*)>2;

boyinanagendrababu
Автор

Really very useful video...pls upload one video for me that's how to insert thamizh data into database table.i most request u pls upload me bro..pls give preference my doubt question.

SelvaKumar-hgho
Автор

Good logic.. How over & partition by is working?

analytikmindz
Автор

Hello sir could please help every month wise how many employees hired. Ex Jan 25 employees, Feb 30 employees like

rajendrakumarsethi
visit shbcf.ru