- 10
- 5 477
Skill Techath0n
India
Приєднався 3 кві 2021
This Channel shares information about Analytics, Interview Preparation, Careers, Job Information including current openings and also study materials for the interview process. We appreciate your insights and welcome relevant comments and discussion. Please be respectful to each other.
PWC SQL Interview Question 2024 | Time Series Data I Find the Average Temperature for Each Day
In this video, I have discussed how to solve the PWC SQL Interview Questions: Find the Average Temperature for Each Day?
-- 1. Create table
CREATE TABLE temperature_readings (
reading_id SERIAL PRIMARY KEY,
sensor_id INT,
reading_time TIMESTAMP,
temperature NUMERIC
);
-- 2. Insert records
INSERT INTO temperature_readings (sensor_id, reading_time, temperature) VALUES
(1, '2024-07-01 08:00:00', 25.4),
(1, '2024-07-01 12:00:00', 27.8),
(1, '2024-07-01 16:00:00', 29.2),
(2, '2024-07-02 08:00:00', 24.7),
(2, '2024-07-02 12:00:00', 26.3),
(2, '2024-07-02 16:00:00', 28.1),
(3, '2024-07-03 08:00:00', 23.5),
(3, '2024-07-03 12:00:00', 25.0),
(3, '2024-07-03 16:00:00', 27.6),
(1, '2024-07-04 08:00:00', 22.9);
SQL Interview QnAs: ua-cam.com/play/PLL871c9yfLoimvglCSz6UQoqLJcFBJGKo.html
#sql #postgresql #deloitte #deloittejobs #mysql #interview #dataengineering #dataanalytics #dataanalysis #capgemini #deloitte #deloittejobs #capgeminihiring #kpmg #pwclipswallah
-- 1. Create table
CREATE TABLE temperature_readings (
reading_id SERIAL PRIMARY KEY,
sensor_id INT,
reading_time TIMESTAMP,
temperature NUMERIC
);
-- 2. Insert records
INSERT INTO temperature_readings (sensor_id, reading_time, temperature) VALUES
(1, '2024-07-01 08:00:00', 25.4),
(1, '2024-07-01 12:00:00', 27.8),
(1, '2024-07-01 16:00:00', 29.2),
(2, '2024-07-02 08:00:00', 24.7),
(2, '2024-07-02 12:00:00', 26.3),
(2, '2024-07-02 16:00:00', 28.1),
(3, '2024-07-03 08:00:00', 23.5),
(3, '2024-07-03 12:00:00', 25.0),
(3, '2024-07-03 16:00:00', 27.6),
(1, '2024-07-04 08:00:00', 22.9);
SQL Interview QnAs: ua-cam.com/play/PLL871c9yfLoimvglCSz6UQoqLJcFBJGKo.html
#sql #postgresql #deloitte #deloittejobs #mysql #interview #dataengineering #dataanalytics #dataanalysis #capgemini #deloitte #deloittejobs #capgeminihiring #kpmg #pwclipswallah
Переглядів: 37
Відео
KPMG SQL Interview Question 2024 | Find out the Studentwise Total Marks for Top 2 Subjects
Переглядів 2377 годин тому
In this video, I have discussed how to solve the KPMG SQL Interview Questions: Find out the Studentwise Total Marks for Top 2 Subjects? 1. Create the student table CREATE TABLE students ( student_name VARCHAR(50), subject VARCHAR(50), marks INT ); 2. Insert records into the student table INSERT INTO students (student_name, subject, marks) VALUES ('Alice', 'Math', 65), ('Alice', 'Science', 80), ...
Deloitte SQL Interview Question 2024 | Classify employees into different performance levels
Переглядів 24114 годин тому
In this video, I have discussed how to solve the SQL Interview Questions: Classify employees into different performance levels based on both performance rating and salary: 'Top Performer' for 'Excellent' rating and salary greater than 7000, 'Good Performer' for 'Good' rating and salary greater than 5000, and 'Others' for all other combination Query to create table: CREATE TABLE employees ( empl...
UST Global SQL Interview Question 2024 | Identifying Gaps in a Sequence
Переглядів 26121 годину тому
In this video, I have discussed how to solve the SQL Interview Questions: Given a table orders with columns order_id (sequential integers), order_date, write a query to identify the missing order IDs. Query to create table: CREATE TABLE orders ( order_id INT PRIMARY KEY, order_date DATE ); Insert Data INSERT INTO orders (order_id, order_date) VALUES (1, '2024-07-01'), (2, '2024-07-02'), (3, '20...
Cognizant SQL Interview Question | Extract the Domain from the Email Column in Employee Table
Переглядів 312День тому
In this video, I have discussed how to solve the SQL Interview Question: Extract the domain name from email column in employee table. #sql #postgresql #deloitte #deloittejobs #capgeminihiring #mysql #interview #dataengineering #dataanalytics #dataanalysis #capgemini #capgeminijobs #sqlfordataengineer #jobinterview #coding #programming #technicalinterview
Deloitte SQL Interview Question 2024 | Find the top 3 highest-paid employees in each department
Переглядів 1,9 тис.День тому
In this video, I have discussed how to solve the SQL Interview Questions: Part 1: Find the top 3 highest-paid employees in each department. Part 2: Find the average salary of employees hired in the last 5 years. Part 3: Find the employees whose salry is less than the average salary of employees hired in the last 5 years. Query to create table: CREATE TABLE Departments ( DepartmentID INT PRIMARY...
Capgemini SQL Interview Question 2024 | Transform Rows Into Columns
Переглядів 97314 днів тому
In this video, I have discussed how to solve the SQL Interview Question: Transform Rows Into Columns: Query to create table: CREATE TABLE sales_data ( month varchar(10), category varchar(20), amount numeric ); Insert data INSERT INTO sales_data (month, category, amount) VALUES ('January', 'Electronics', 1500), ('January', 'Clothing', 1200), ('February', 'Electronics', 1800), ('February', 'Cloth...
SQL Interview Question | Use Different Methods to Find the Nth Highest Salary
Переглядів 1,6 тис.14 днів тому
In this video, I have discussed how to solve the most commonly asked SQL Interview Question : 1. How to find the highest salary? 2. How to find 2nd highest salary? 2. How to find nth highest salary using a Sub-Query? 3. How to find nth highest salary in using a CTE? 4. How to find the 2nd, 3rd or 15th highest salary? #sql #postgresql #deloitte #deloittejobs #mysql #interview #dataengineering #d...
Module 2 | Variables, Casting and Data Types in Python | Hands on Course
Переглядів 20Місяць тому
Welcome to Module 2 of Python for Data Science Hands-on Course! In this video, I have discussed the following: - Creating Variables - Variables Name - Casting - Getting the type of variable - Case sensitive - Examples SQL Interview QnAs: ua-cam.com/play/PLg_hSLs-7hbtyGn5vf5ErN6oo0CcILhfz.html PySpark Basic to Advance: ua-cam.com/play/PLg_hSLs-7hbvIqzZgvViJcxkW09yOwg3L.html Python Basic to Advan...
Module 1 | Introduction to Python for Data Science | Hands on Course
Переглядів 16Місяць тому
Welcome to Module 1 of Python for Data Science Hands-on Course! In this video, I have discussed the following: - About Python - Installing Python - First Code - Comments - Basic Mthematical Operations Download Anaconda: www.anaconda.com/products/distribution Follow us on Instagram for regular updates: skilltechathon 🔥 skilltechathon 🔥 #Interview #datascience #pytho...
with final as (select coalesce(order_id - lag(order_id) over (partition by id order by id),0) as diff , row_number() over (partition by id order by id) as row_num from input_table) select row_num as Order_id from final where diff=2
select month, sum(if(category="electronics",amount,null)) as electronics, sum(if(category="clothing",amount,null)) as clothing from sales_data group by 1 order by 1;
@ishanshubham8355 Great! Keep practicing :) Let us know if you need us to solve any particular question.
select student_name, sum(marks) as marks from ( select *, dense_rank() over(partition by student_name order by marks desc) as rnk from students ) as m where rnk <3 group by 1
@ishanshubham8355 Continue practicing, Wish you all the success for your endeavours :)
Informative.
@RaviSankar-ln3ki Glad it was helpful!
WITH RECURSIVE CTE AS ( SELECT MIN(ORDER_ID) AS cnt FROM orders UNION SELECT cnt+1 FROM cte WHERE cnt < (SELECT max(order_id) FROM orders) ) SELECT cnt AS order_id FROM cte WHERE cnt NOT IN (SELECT order_id FROM orders)
@ishanshubham8355 Great! Keep practicing :)
select month, sum(case when category = 'clothing' then amount end )as clothing, sum(case when category = 'electronics' then amount end )as electronics from sales_data group by month
@devarajululanka6427 Great! Keep practicing :) Let us know if you need us to solve any particular question.
SELECT * FROM SALES_DATA SELECT MONTH,MAX(CASE WHEN CATEGORY='ELECTRONICS'THEN AMOUNT END) AS ELECTRONICS ,MAX(CASE WHEN CATEGORY='CLOTHING' THEN AMOUNT END) AS CLOTHING FROM SALES_DATA GROUP BY MONTH ORDER BY MONTH
@chandramohan-bo5se Great! Keep practicing :) Let us know if you need us to solve any particular question.
plss dnt stop making videos
Thank you 🙏 Will make sure to upload videos at regular interval.
Hi, In first question while finding the top 3 employees within each department, dense_rank() would be appropriate one because it will handle tie values without skipping the ranking rather than row_number IMO. Thank you for the constant motivation through SQL Questions ! Looking for more ...
Yes, definitely if the interviewer asked us to provide the same rank for duplicate values. Thanks for mentioning it 👍
On the contrary, using dense_rank may give us more than 3 values (if there are ties), rather we only need to find top 3 highest paid employees (3 rows), row_number will always ensure that we get only 3 rows in the result set.
Without using crosstab, can do with group by, will the company accept it
Yes, how you interpret the problem and solve, it's completely upto you. Everyone has a different way of perceiving the problem and solving it.
fantastic
Thank you! Cheers!