Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways

SQL Intermediate interview questions | Day 11

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.

SQL Intermediate interview questions

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 – http://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 – http://thedatamonk.com/question/get-alternate-record-from-table/
SQL Regular Expression – http://thedatamonk.com/question/sql-regular-expression/
SQL Regular Expression 2 – http://thedatamonk.com/question/sql-interview-question-conditional-query/
NVL vs NVL2 – http://thedatamonk.com/question/what-is-the-difference-between-nvl-and-nvl2-functions/
Fetch distinct email domains – http://thedatamonk.com/question/extract-all-the-distinct-email-id-domain-from-all-the-employee/
Name and Frequency – http://thedatamonk.com/question/get-the-number-of-duplicate-names-and-their-frequency/
Remove duplicate rows – http://thedatamonk.com/question/write-the-query-to-remove-the-duplicates-from-a-table-without-using-a-temporary-table/
Common records – http://thedatamonk.com/question/write-a-sql-query-to-find-the-common-records-between-two-tables/
Hash join – http://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 πŸ˜›

In order to practice more courses on Data Science, we definitely recommend Data Camp

Practice all the questions posted over here, try to make sure that you attempt the questions. we evaluate answers every now and then and provide particular feedback on your performace

If you want any guidance or want to make a career in Data Science, then you can take a look on our proposed Data science path

Connect with me on Linkedin for latest updates and Data Science e-books giveaways- https://www.linkedin.com/in/nitin-kamal-a2841a80/

Our Linkedin Page for latest updates and giveaways- https://www.linkedin.com/company/14573769

Keep Learning πŸ™‚

The Data Monk

About TheDataMonkMaster

I am the Co-Founder of The Data Monk. I have a total of 4+ years of analytics experience with 3+ years at Mu Sigma and 1 year at OYO. I am an active trader and a logically sarcastic idiot :)

Follow Me

Comments ( 2 )

  1. 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- vsinghal.mbox@gmail.com

Leave a reply