0

I have a table called products, it has a column called products_price with 10000+ different prices, I want to add all the prices together. How can this be done?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
John
  • 136
  • 1
  • 12

1 Answers1

1

Most SQL implementations (including MySQL) support special select operators. In your case, you'd do something like

SELECT SUM('products_price') from 'products';

Easy :)

by the way, I don't know what you've googled, but really, this solution kind of hits you right in the face as soon as you type "Mysql column sum" into googles search bar.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94