mysql sum if

In today’s quick tip screencast, we’re going to learn a MySQL query trick. You might be already familiar with the SUM() and IF() functions. We will be combining them to come up with some useful queries. This can reduce the number of queries you need to run for fetching certain types of summary data, and also provide a performance improvement.

cdl_capture_2011-04-14-16_ 000

 

 

http://net.tutsplus.com/tutorials/databases/quick-tip-working-with-mysql-and-sum/

Leave a comment