with cte as ( select order_id,AVG(quantity) as avg_quantity from t1 group by order_id ) select order_id from t1 where quantity > cte. avg_quantity and order_id=cte.order_id;
how come the project discussion is happening in the first round. Usually, they asked about Python, and SQL questions in the first round to check the basic foundation. Correct me if I am wrong here
with tab1 as( SELECT order_id, max(quantity) as max_value, avg(quantity) as avg_quantity FROM orders GROUP BY order_id) SELECT order_id FROM tab1 WHERE max_value > ALL(SELECT avg_quantity FROM tab1 )
For that python question:
input = 'thebigdatashow'
start = -1 * k
end = len(input) - k
for i in range(start,end):
print(input[i],end="")
with cte as (
select order_id,AVG(quantity) as avg_quantity
from t1
group by order_id
)
select order_id
from t1
where quantity > cte. avg_quantity
and order_id=cte.order_id;
s='thebigdatashow'
k=2
s1=s[-k:]
s2=s[:-k]
print(s1+s2)
how come the project discussion is happening in the first round. Usually, they asked about Python, and SQL questions in the first round to check the basic foundation.
Correct me if I am wrong here
This dependes upon the company.
subtitles are not fully visible
with tab1 as(
SELECT order_id, max(quantity) as max_value, avg(quantity) as avg_quantity
FROM orders
GROUP BY order_id)
SELECT order_id
FROM tab1
WHERE max_value > ALL(SELECT avg_quantity FROM tab1 )
Don't you think his intro was too long and the interviewer has to cut him in between to ask questions quickly?
Not necessarily.