Have a look at GROUP BY and aggregate functions:
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html
- Original Message -
> From: "Norman Khine"
> To: mysql@lists.mysql.com
> Sent: Thursday, 23 June, 2011 4:05:35 PM
> Subject: sql query advise
>
&
hello,
i have this SQL code in a python programme but i wanted to change the
SQL so that it returns totals for each date. or do i have to make a
loop for each date range so that i get the following results which
then i would like to plot on a graph.
$ python daily_totals.py
(2L, Decimal('173.95834
dite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
hello,
i have to write a query which has to pull data from a remote mysql
server, modify the table scheme, format some of the fields and then
populate the new database.
i am using MySQLdb which is a python interface to mysql db.
how would i write a query to do this update from from a single
state