You are here: Re: MySQL - finding the best buyer / the best buying country, etc. « PHP SQL « IT news, forums, messages
Re: MySQL - finding the best buyer / the best buying country, etc.

Posted by J.O. Aho on 03/12/06 02:05

Sébastien wrote:
> Hi,
>
> I'm working on a website using a PayPal, with a custom PHP/MySQL
> (v4.0.17, very unlikely to be able to upgrade for this project) shopping
> cart. This is only to let you know about the setup.
>
> Now to my question:
>
> I have a table with transaction informations, in which I have a line for
> each transacion, containing a user identifier, their country of
> residence, the amount of the transaction, and much more.
>
> I want to be able to tell which user is the best buyer (or maybe the
> best 10/20 buyers).
> I also want to know which country buys the most.

Use GROUP BY
http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html



//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация