Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 17,990 of 19,505    |
|    Luciano (DOC) to All    |
|    Sum, count and divide    |
|    28 Oct 10 21:28:14    |
      From: lucianodoc@luciano.doc              I have a table having this structure:       idrecord       nation       value       What I have to get by a query is grouping records by nation, summing and       counting the values, dividing negative by positive.       Therefore:       USA, sumOfPositiveValues, CountOfPositiveValues, sumOfNegativeValues,       CountOfNegativeValues       ITALY, sumOfPositiveValues, CountOfPositiveValues, sumOfNegativeValues,       CountOfNegativeValues       FRANCE, sumOfPositiveValues, CountOfPositiveValues, sumOfNegativeValues,       CountOfNegativeValues       I hope I was clear enough :-)       Thanks.              Luciano              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca