vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi I would expect the following result : [ ID ][ Total ] [ 1 ][ 20 ] [ 2 ][ 30 ] [ 3 ][ 40 ] [ 4 ][ 10 ] because if you SUM(Total) in the result you will see it = 100 On 9/19/06, André Hänsel <haensel@creations.de> wrote: > > > -----Ursprüngliche Nachricht----- > > Von: Ahmad Al-Twaijiry [mailto:ahmadt@gmail.com] > > Gesendet: Montag, 18. September 2006 23:28 > > An: mysql@lists.mysql.com > > Betreff: SUM in WHERE > > > [...] > > > > I want to run SQL query that will return to me the first > > records that the > > SUM of Total field = 100 > > > > for example > > > > SELECT * FROM tbl_name WHERE SUM(Total)=100 ORDER BY ID > > > > I know my SQL statment above will not work, could someone help me ? > > So what result do you expect from your query? > > -- Ahmad Fahad AlTwaijiry |