azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺 ([personal profile] azurelunatic) wrote2002-08-23 10:45 am

I am evil. I am officiallly evil.

....and I can write SQL code fully as clunky as Access itself.

To wit:

SELECT COUNT(CUST_NUM) AS [All Your Customers With Orders Are Belong To Larry Fitch]
FROM (
SELECT DISTINCT CUST_NUM
FROM (
SELECT CUST_NUM FROM CUSTOMERS
WHERE CUST_REP = (
SELECT EMPL_NUM FROM SALESREPS WHERE (NAME = 'Larry Fitch'))
), ORDERS
WHERE CUST_NUM = CUST);


[Edit: Sorry, all those who loaded your friends page in those twenty seconds while I was correcting my injudicious use of the <xmp> tag]