realbasic-nug.it
[Top] [All Lists]

query SQL

To: REALbasic Italian NUG <realbasic-nug.it@lists.realsoftware.com>
Subject: query SQL
From: Gualeni Giovanni <ggualeni@tiscali.it>
Date: Mon, 8 Jun 2009 09:56:22 +0200
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug.it-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug.it-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
Reply-to: REALbasic NUG Italian <realbasic-nug.it@lists.realsoftware.com>
Sender: realbasic-nug.it-bounces@lists.realsoftware.com
Buon inizio di settimana a tutti,

ho la seguente tabella (la parte importante diciamo)

NUMBER    LAP    PENT
10             1       12
42             1       1
52             1       18
42             2       12
86             1       11
42             3       2

SELECT PETT, SUM(PENT) AS PN FROM TAB GROUP BY PETT ORDER BY PN

Questo mi da la somma per PETT ma come dovrebbe essere la query per poter estrarre la somma di PENT per ogni NUMBER ma suddivisa per LAP ? (mi sto montizzando)

Giovanni



<Prev in Thread] Current Thread [Next in Thread>