Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As a guy about to finish up school and make his way into the work force, would you be willing to release some of the questions you use in interviews. It be neat to see which areas I need to patch up knowledge wise!


Try this quiz. It's based on a quiz I saw posted on HN a while back.

http://sqlfiddle.com/#!3/3973f/1

Edit: I'm not allowed to reply just yet, so I'll post here.

You need to add the boss first to the employee table with a NULL bossID.

Then you add another employee that has a bossID that refers to that last added record.


Aww - no test data? And when trying to add test data, I get errors due to the self-referencing foreign key. Perhaps the schema could do with a

> DEFAULT (IDENT_CURRENT('dbo.Employees'))

on the BossID column. Been awhile (years) since I've worked with SQL Server.


When the site is back up, I'll verify the link and post here. It's been about 2 months since I've used it.

Simple query stuff though.

Basic aggregate stuff. When to use "LEFT JOIN". Creating a scalar function. Multiple table JOINs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: