Auditude interview questions

http://www.auditude.com/
Auditude is an online video advertising technology and monetization partner for premium content owners and distributors.

A recruiter contacted me and scheduled a phone interview with one of the managers. The interview was not technical and consisted of typical HR questions. Why are you looking for a new position? What are you doing at your current position? At the end of the interview an on-site interview was scheduled.
The office was a typical open-space dot com office – nothing fancy.
Three engineers interviewed me and asked the following questions:

1)      Given the following table:

user_id lab_id
1 1
2 2
3 3
4 3
5 3
6 2
1 1
1 2
2 3
2 3
5 3
6 2
6 1
6 4
3 2
1 1
1 1
3 2


For each user find the number of unique visits for each lab.


SELECT
  user_id,
  count(distinct lab_id) number_of_unique_visits
FROM tst
GROUP BY user_id;

For each user find the number of times he visited each lab.


SELECT
  user_id,
  lab_id,
  count(*) AS number_of_visits
FROM tst
GROUP BY user_id, lab_id;

For each user find the most visited lab.

SELECT
  t1.user_id,
  (SELECT t2.lab_id FROM tst t2 WHERE t2.user_id = t1.user_id GROUP BY t2.user_id, t2.lab_id ORDER BY count(*) DESC LIMIT 1) most_visited_lab
FROM tst t1
GROUP BY t1.user_id;

2)      In PHP, what is the difference between $objt and $$ objt?

3)      Design a simple database for an online store.

4)      Based on the database design, write a statement to select all orders that contain at least 5 products (i.e. the total quantity of items ordered is greater or equal to five).

5)      Based on the database design, write a statement to select all orders that contain at least 5 different products (i.e. the quantity of each item ordered is not important).

6)      Difference between UNION and UNION ALL in MySQL

7) You are given a sorted array with shifted elements. Elements can be shifted to the left or right by some number of places. Write code to find if a given number N is present in this array. http://crackinterview.wordpress.com/2010/08/20/find-an-item-in-a-sorted-array-with-shifted-elements/

I usually try not to be judgmental because I only get interviewed to write this blog, but the unfortunate truth is that there are so many jerks in dot-com companies that there are times that it is just impossible to stay imperturbable.
The first interviewer was a typical PHP developer who had no idea about MySQL internals but thought he ruled the world, and could easily optimize any SQL query.
The third interviewer who introduced herself as a chief scientist that does not bother to write any code (yes, she emphasized that) spoke English so badly that it took me 30 minutes to understand her question.
And in the middle of me trying to understand what she was actually trying to say, she simply walked out of the room because she had an urgent call – well, she is the chief genius there.


Leave a Reply


− 2 = four

Pinterest
Email