Posts

Showing posts with the label interview

Development : No Great Shakes at SQL

I was just handed a technical test, this was for a job interview, and I was a little... well I'll say surprised, but then shocked, by the reply, lets take a look... I was handed these SQL statements, in several questions, and then told to summarise what I should see on any output of the various instructions.... create table customers (id INTEGER PRIMARY KEY, name Text, age INTEGER, weight REAL); insert into customers values(73, "Brian", 42, 33); insert into customers values(1, "Helen", 12, 12.5); select * from customers; SELECT name, CASE WHEN age > 18 THEN "adult" ELSE "minor" END "type" FROM customers; create table orders (id INTEGER PRIMARY KEY, customer_id INTEGER, desc TEXT); insert into orders values (0, 73, "Apples"); insert into orders values (1, 73, "Oranges"); insert into orders values (2, 1, "Bananas"); select * from orders; SELECT customers.name, orders.desc FROM customers JOIN orders ON ...