SQL Intermediate interview questions
Today is Day 11 and we have SQL Intermediate Interview Questions for Data Science interviews.
There are two parts of this article, the first one is, as usual, the daily quiz where we have 10 SQL intermediate interview questions and you will get 10 points by answering each question.
Secondly, there are 10 very basic questions below, if you answer even 5 out of these then you can post it as a comment and at the end of the comment write your email id and we will send an e-book – ‘Crack Your Next Data Science Interview with 300+ Questions’ for free.
If you are planning to comment on the answers then make a profile by clicking on the upper left corner ‘Login’
Day 11 – SQL Intermediate interview questions
Conditional Query – https://thedatamonk.com/question/find-all-the-students-who-either-are-male-or-live-in-mumbai-have-mumbai-as-a-part-of-their-address/
Alternate record – https://thedatamonk.com/question/get-alternate-record-from-table/
SQL Regular Expression – https://thedatamonk.com/question/sql-regular-expression/
SQL Regular Expression 2 – https://thedatamonk.com/question/sql-interview-question-conditional-query/
NVL vs NVL2 – https://thedatamonk.com/question/what-is-the-difference-between-nvl-and-nvl2-functions/
Fetch distinct email domains – https://thedatamonk.com/question/extract-all-the-distinct-email-id-domain-from-all-the-employee/
Name and Frequency – https://thedatamonk.com/question/get-the-number-of-duplicate-names-and-their-frequency/
Remove duplicate rows – https://thedatamonk.com/question/write-the-query-to-remove-the-duplicates-from-a-table-without-using-a-temporary-table/
Common records – https://thedatamonk.com/question/write-a-sql-query-to-find-the-common-records-between-two-tables/
Hash join – https://thedatamonk.com/question/what-is-hash-join/
Assume the name of the columns and tables according to your will ๐
1. Get all employee detail from EmployeeDetail table whose
“FirstName” not start with any single character between ‘a-p’
2.Write an SQL Query find number of employees
according to gender whose DOB is between 01/01/1960 to
31/12/1975.
Use column name as sex,DOB table name Employees
3. How to fetch alternate records(even rows) from a table?
4.Get Student details from Student table whose first name ends with ‘n’
5.Get Student details from Student table whose first name starts with ‘J’
and name contains 4 letters
6.Get Student details from Student table whose Fee between 500000 and
800000
7.Get Student details from Student table whose name is ‘Jay’ and ‘Michael’
8.Get Student details from Student table whose Student name are not
โJayโ and โRanjitโ
9. The HAVING clause does which of the following?
a. Acts like a WHERE clause but is used for groups ra ther than rows.
b. Acts like a WHERE clause but is used for rows rather than column s.
c. Acts like a WHERE clause but is used for columns rather than group s.
d. Acts EXACTLY like a WHERE clause.
10.What is DML?
Try to answer all these questions by yourself or with the help of google ?
The Data Monk Interview Books โ Donโt Miss
Now we are also available on our website where you can directly download the PDF of the topic you are interested in. At Amazon, each book costs ~299, on our website we have put it at a 60-80% discount. There are ~4000 solved interview questions prepared for you.
10 e-book bundle with 1400 interview questions spread across SQL, Python, Statistics, Case Studies, and Machine Learning Algorithms โ Ideal for 0-3 years experienced candidates
23 E-book with ~2000 interview questions spread across AWS, SQL, Python, 10+ ML algorithms, MS Excel, and Case Studies โ Complete Package for someone between 0 to 8 years of experience (The above 10 e-book bundle has a completely different set of e-books)
12 E-books for 12 Machine Learning algorithms with 1000+ interview questions โ For those candidates who want to include any Machine Learning Algorithm in their resume and to learn/revise the important concepts. These 12 e-books are a part of the 23 e-book package
Individual 50+ e-books on separate topics
Important Resources to crack interviews (Mostly Free)
There are a few things which might be very useful for your preparation
The Data Monk Youtube channel โ Here you will get only those videos that are asked in interviews for Data Analysts, Data Scientists, Machine Learning Engineers, Business Intelligence Engineers, Analytics managers, etc.
Go through the watchlist which makes you uncomfortable:-
All the list of 200 videos
Complete Python Playlist for Data Science
Company-wise Data Science Interview Questions โ Must Watch
All important Machine Learning Algorithm with code in Python
Complete Python Numpy Playlist
Complete Python Pandas Playlist
SQL Complete Playlist
Case Study and Guesstimates Complete Playlist
Complete Playlist of Statistics
Comments ( 2 )
1. select * from EmployeeDetail where FirstName like ‘[^a-p]%’;
2. select count(*),sex from Employees where DOB between ’01/01/1960′ AND
’31/12/1975′ GROUP BY sex;
3. select * from table where column%2=0;
4. select * from Student where ‘first name’ like ‘%n’;
5. select * from Student where ‘first name’ like ‘j____’;
6.select * from Student where Fee BETWEEN 500000 AND 800000;
7. select * from student where name =’Jay’ AND name=’Michael’;
8.select * from student where name !=’Jay’ AND name!=’Ranjit’;
9.A
10.DML- It stands for Data Manipulation Language and involves data inserting, updating , deleting. Also in DML sql allows statement to be written for DBMS to interpret how to interact with the data.
EMAIL- [email protected]
Awesome