Scenario Based Question | Oracle Database SQL Tricky Interview Questions

  Рет қаралды 29,784

Oracle SQL and PLSQL Tricky Interview Questions

Oracle SQL and PLSQL Tricky Interview Questions

Күн бұрын

Пікірлер: 32
@TechXplorePro
@TechXplorePro 4 жыл бұрын
🔥🔥🔥Very complicated scenario explained in a detailed manner. This is the best way of Quick Learn SQL. Keep Going👍👍👍🔥🔥🔥
@sankar2885
@sankar2885 3 жыл бұрын
Thank you ji...well explained
@pankajkharade6936
@pankajkharade6936 3 жыл бұрын
Excellent Explanation Sir
@shaliniguha1822
@shaliniguha1822 3 жыл бұрын
This is excellent. Thanks a lot!
@pritammishra9850
@pritammishra9850 4 жыл бұрын
Most amazing
@deepakjagdale6215
@deepakjagdale6215 4 жыл бұрын
Good video.. Thanks !!
@shikhaacholia4820
@shikhaacholia4820 3 жыл бұрын
wow, loving it
@thisisvikaas
@thisisvikaas 4 жыл бұрын
MYSQL Query for the same select distinct(quote_id), case when count_id = Delivered then "Complete" when count_id Delivered AND Delivered > 0 then "In Delivery" when Submitted>1 then "Awaiting for submission" else "Awaiting for Entry" end as status from (select quote_id, count(quote_id) as count_id, ifnull(sum(case when order_status = "Delivered" then 1 end),0) as Delivered, ifnull(sum(case when order_status = "Submitted" then 1 end),0) as Submitted, ifnull(sum(case when order_status = "Created" then 1 end),0) as Created from order_table_new group by quote_id)temp
@farhamsh7858
@farhamsh7858 4 жыл бұрын
thanks for explaining so well. When we use distinct in a query, interviewers mostly ask about performance, like, if there are millions of records, will you use same approach. wat cud be a possible approach?
@trickyinterviewquestions
@trickyinterviewquestions 4 жыл бұрын
Point is Distinct is not associated with only this query. Interviewer can ask same thing for any question or even in general. There might be various approaches to tackle the performance problem due to distinct. It depends upon query, table, partitions... Usually indexing is the good idea to start with.
@famlady
@famlady Жыл бұрын
I had been asked the alternative way to be used instead of using distinct
@devanaidu9406
@devanaidu9406 4 жыл бұрын
Hi Bro very nice explanation..thank you somuch for sharing can you please make some videos on performance tuning concepts asap
@trickyinterviewquestions
@trickyinterviewquestions 4 жыл бұрын
Sure, that is in my list.
@devanaidu9406
@devanaidu9406 4 жыл бұрын
@@trickyinterviewquestions thank you sir..we are eagerly waiting
@ganeshsial
@ganeshsial 3 жыл бұрын
simple use decode or case statement, not require lenghy code
@devanaidu9406
@devanaidu9406 4 жыл бұрын
1)what is collection,why we have to use collections,2) when you use nested table ?what is dense and parse in collections? can you please explain it? please explain main usages
@trickyinterviewquestions
@trickyinterviewquestions 4 жыл бұрын
These are very specific questions. Well, go through google at this time. I will try to cover in my next videos. Thanks.
@devanaidu9406
@devanaidu9406 4 жыл бұрын
@@trickyinterviewquestions thank you sir..please make it asap
@Nikhil-jj7xf
@Nikhil-jj7xf 4 жыл бұрын
do you have any blog so we can have text verion of this query
@trickyinterviewquestions
@trickyinterviewquestions 4 жыл бұрын
Not yet but will soon upload new videos.
@sameerhussain6060
@sameerhussain6060 3 жыл бұрын
Super sir, my question is the approach and mindset… how to built that ??
@trickyinterviewquestions
@trickyinterviewquestions 3 жыл бұрын
Make your fundamentals strong and practice.
@pankajkharade6936
@pankajkharade6936 3 жыл бұрын
Hi Sir Using Case With DS AS ( Select QUOTE_ID,ORDER_ID,ORDER_STATUS, (CASE WHEN ORDER_STATUS='Delivered' THEN '0' WHEN ORDER_STATUS='Submitted' THEN '1' WHEN ORDER_STATUS='Created' THEN '2' END) CS From OrderStatus ) Select QUOTE_ID, (CASE WHEN SUM(CS)=0 THEN 'COMPLETE' When COUNT(CASE WHEN CS=0 THEN 1 ELSE 0 END)>=1 THEN 'IN DELIVERY' When COUNT(CASE WHEN CS=1 THEN 1 ELSE 0 END)>=1 THEN 'AWAITING FOR SUBMISSION' WHEN COUNT(CASE WHEN CS=2 THEN 1 ELSE 0 END)>=1 THEN 'AWAITING FOR ENTRY' END) Status From DS GROUP BY QUOTE_ID;
@SakthiVel-pi5lj
@SakthiVel-pi5lj Жыл бұрын
SELECT ID,CASE WHEN DEL>=3 THEN 'Complete' WHEN DEL>=1 AND SUB>=1 THEN 'In Delivery' WHEN SUB>=1 AND CRE>=1 THEN 'Pen Submit' WHEN SUB=0 AND CRE>=1 THEN 'In Entry' END sts FROM( SELECT * FROM SCHK PIVOT ( Count(STATUS) FOR STATUS IN ( 'DELIVERED' "DEL",'SUBMITTED' "SUB",'CREATED' "CRE") ) ORDER BY ID)
@DiptiThakursmile
@DiptiThakursmile 4 жыл бұрын
Can I get query in sql server
@trickyinterviewquestions
@trickyinterviewquestions 4 жыл бұрын
Just check if there are any equivalent functions available
@abhrajyotichanda6476
@abhrajyotichanda6476 3 жыл бұрын
WITH TEMP AS ( select Quote_Id , COUNT (ORDER_ID) TOT, count(Delivered) Delivered, count(Submitted) Submitted, count(Created) Created FROM ( Select Quote_Id, ORDER_ID, decode (order_status, 'Delivered' ,'Delivered',null) Delivered, decode (order_status, 'Submitted' ,'Submitted',null) Submitted, decode (order_status, 'Created' ,'Created',null) Created from OrderStatus3 ) GROUP BY Quote_Id ) SELECT Quote_Id, case when tot=Delivered then 'Complete' when totDelivered and Delivered >=1 then 'In Delivery' when totDelivered and Submitted >=1 then 'Awaiting for Submission' else 'Awaiting for Entry' END Status FROM TEMP order by Quote_Id;
@ishaan12vlog
@ishaan12vlog 4 жыл бұрын
plz instr ya substr m ap n like instr(sta,'|') ye condition smjha do
@SakthiVel-pi5lj
@SakthiVel-pi5lj Жыл бұрын
Complete
@kuldeepgupta8526
@kuldeepgupta8526 Жыл бұрын
select QUOTE_ID, case when DELIVERED_COUNT = ORDER_COUNT then 'COMPLETE' when DELIVERED_COUNT > =1 then 'IN DELIVERY' when SUBMITTED_COUNT > = 1 then 'AWAITING FOR SUBMISSION' else 'AWAITING FOR ENTRY' end status from (SELECT QUOTE_ID, COUNT (ORDER_ID) order_count, SUM (CASE WHEN ORDER_STATUS = 'DELIVERED' THEN 1 ELSE 0 END) DELIVERED_COUNT, SUM (CASE WHEN ORDER_STATUS = 'SUBMITTED' THEN 1 ELSE 0 END) SUBMITTED_COUNT, SUM (CASE WHEN ORDER_STATUS = 'CREATED' THEN 1 ELSE 0 END) CREATED_COUNT FROM order_status GROUP BY QUOTE_ID )
Interesting Complex Scenario  | Oracle SQL Database Tricky Interview Questions
17:12
Oracle SQL and PLSQL Tricky Interview Questions
Рет қаралды 943
25 SQL/PLSQL  Questions With One Word Answer (Oracle Tricky Interview Questions)
12:21
Oracle SQL and PLSQL Tricky Interview Questions
Рет қаралды 23 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Oracle Performance tuning | Oracle hard parse vs soft parse
13:36
Siva Academy
Рет қаралды 23 М.
oracle dba interview questions and answers for  experience
26:34
RACSINFOTECH
Рет қаралды 20 М.