What's wrong with this derived table query?

Discussion in 'MySQL' started by kuttappan, May 12, 2010.

  1. #1
    The derived table accounts for the fact that there are multiple records for each tracking_number. It is summing all the net_amount columns for each tracking_number. Then the rest of the query is trying to generate data to drive a histogram with bins that are 3 digits apart.

    This is the error I am getting:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod3 ) AS label FROM ( SELECT b.tracking_number , SUM( b.net_amount ) as net_a'
     
    kuttappan, May 12, 2010 IP
    tintumon likes this.