DevPinoy.org
A Filipino Developers Community
ATTENTION:Take our Code Challenge for the month of October 2008 and win some great prize! Learn more about it here!

SELECT COUNT(QUANTITY)

i just got back from an interview with another local company after being invited by their CEO to explore my opportunities with them.  it was unexpected that i scheduled for an interview today and you can find the reason on my personal blog (if you have the link).

exam was not that hard and what caught me was this sql statement exercise to total the quantities of a given purchase order with some table joins.  i was surprised when the project lead asked me if i have experience with query statements and i answered yes since i have been using it a lot in all of my previous projects.  turns out that i used SELECT COUNT(QUANTITY) instead of SELECT SUM(QUANTITY).  i was laughing and i'm glad she didn't have it against me.

what was going around my head when i answered that question was "i need to get the total count of a particular item" which is the reason why i used COUNT aggregate function.  so beware of the same mistake!


Posted Feb 14 2006, 03:24 AM by jokiz
Filed under: ,

Comments

bonskijr wrote re: SELECT COUNT(QUANTITY)
on 02-15-2006 6:49 AM
heheh, good cover

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Enter the numbers above:

Copyright DevPinoy 2005-2008
Powered by Community Server (Commercial Edition), by Telligent Systems