Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by time interval again
Message
De
31/01/2003 07:49:13
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brésil
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Group by time interval again
Divers
Thread ID:
00747602
Message ID:
00747602
Vues:
48
Hello Dear friends,

i have two tables with the folow structure,

Fluxo(idCostumer, idDoor, dateTime, quantity)
clientesPortas(idCustomer, idDoor, name)

I need to create a SQL Statement to Sum the field quantity group by each 15 minutes?

i´m trying to do this

SELECT CONVERT(char(5), (fluxo.dateTime),108) AS Time, clientesPortas.name, SUM(fluxo.quantity) quantity, FLUXO.dateTime
FROM CLIENTESPORTAS INNER JOIN FLUXO ON CLIENTESPORTAS.idDoor = FLUXO.idDoor
WHERE CLIENTESPORTAS.idCustomer = 1 AND
fluxo.dateTime > '1/1/2003' AND
fluxo.dateTime < '1/2/2003'
GROUP BY CONVERT(char(5), (fluxo.dateTime),108), clientesPortas.name, FLUXO.dateTime
ORDER BY time, clientesPortas.name


But the result hide some values.


Someone can help me?

Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform