General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
SELECT lot,count(lot) as labels,sum(IIF(received=.t.,1,0)) as received ;
FROM mytable ;
GROUP BY lot
(This is assuming that there is always a label for each lot)
HTH
Tom
>Hi guys!
>
>I have a table with the next fields:
>
>Lot --- Label ---- received
>4848 -- 001 ---- t
>4848 -- 002 ---- t
>4848 -- 003 ---- f
>4848 -- 004 ---- t
>4048 -- 005 ---- t
>4048 -- 006 ---- t
>4048 -- 007 ---- f
>
>I need a sql command that returns the next dataset:
>Lote---labels---received
>4848----4 ------ 3
>4048----3 -------2
>
>I'd really appreciate it any kind of help !
>
>Best Regards
>Martin
Previous
Next
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