General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>This still isn't what I need. This gives:
>
>month Type cnt
>3 1 89
>3 2 118
>4 1 90
>4 2 57
>etc
>
>I Need:
>
>month dcn eo
>3 89 118
>4 90 57
>etc
Okay, in that case, do it the way I wrote it first, then deleted when I thought of the other <g>:
SELECT month, SUM(IIF(type="1", 1, 0)) AS nDCN, ;
SUM(IIF(type='2', 1, 0)) AS nEO ;
FROM YourTable ;
WHERE whatever ;
GROUP BY 1
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only