I recently saw a job that I thought I'd be good for, so they sent me a
test...
All good.. but I realised that I couldn't do it..
I got sooo damned close, but could not finish... :-(
Anyhoo, here's the test:
http://www.beertastic.co.uk/test_problem.zip
And the test parameters are below
If anyone
OK. No offense, but that seems fairly easy.
Here's one possible answer:
select categories.*,count(dv_id)
from categories
left join dvds on dv_caid=ca_id
group by ca_name
having ca_name not like 'T%';
On Dec 1, 2004, at 8:13 AM, [EMAIL PROTECTED] wrote:
I recently saw a job that I thought I'd be
, we learn...
Brent Baisley [EMAIL PROTECTED]
01/12/2004 13:44
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] Job interview test - I give up...
OK. No offense, but that seems fairly easy.
Here's one possible answer:
select categories.*,count(dv_id)
from categories
left
/*
NOTE: this is what I came up with though I don't have the time to test
it.
I think theres another way to solve this just by using a
different
sql statement.
*/
function getNumDvdsInCategories() {
$query = SELECT ca_id , ca_name FROM categories, dvds WHERE
, I'll try what you've suggested...
Cheers.. we live, we learn...
Brent Baisley [EMAIL PROTECTED]
01/12/2004 13:44
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: [PHP-DB] Job interview test - I give up...
OK. No offense, but that seems fairly easy.
Here's one possible answer:
select
PROTECTED]
Subject
Re: [PHP-DB] Job interview test - I give up...
I code much better with drink than after drink.
You never had to use JOIN before? Obviously you are not married.
Although marriage tends to be a left join or right join as opposed to a
straight join, which allows you to force
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004 8:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Job interview test - I give up...
I recently saw a job that I thought I'd be good for, so they
sent me a
test...
All good
--- Gryffyn, Trevor [EMAIL PROTECTED]
wrote:
If you have Microsoft Access or something else that
graphically lets you
create queries, you might try building a query that
you know works and
returns what you need, then looking at the SQL VIEW
to see how the
syntax goes. It can help you
Bloody marvelous...!!!
Many thanks.. I'll set myself a few challenges, and see what happens...!
Cheers,
Tris...
Gryffyn, Trevor [EMAIL PROTECTED]
01/12/2004 15:47
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
[PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give
up