My Computer Forum Computer Science Forum

Go Back   My Computer Forum > Computer Science Forum > Databases

Databases Relational Databases and Data Mining- Database Models: Hierarchical, Network, Object, Post-Relational


Reply
 
LinkBack Thread Tools Display Modes
December 4th, 2010, 12:09 PM   #1
 
Joined: Feb 2009
Posts: 1
Command to

There is MySQL database with 2 columns. One with prices and one with years.
What question do I insert for it to give me sum of all prices between years 1996 and 1999?
Tank271 is offline  
 

My Computer Forum is free to register and we welcome everyone!

December 6th, 2010, 03:36 AM   #2
Site Founder
 
julien's Avatar
 
Joined: Dec 2007
Posts: 414
Re: Command to

You might want to check in the mysql manual whether there exists a sum command that outputs an array containing the sum of the two columns (such a command exists in Microsoft Access databases). Alternatively, if it doesn't exist, you could just create an extra column that would be defined as the sum of the two, and query your table for the records in this column ...
julien is offline  
Reply

  My Computer Forum > Computer Science Forum > Databases

Tags
command



Thread Tools
Display Modes






Copyright © 2017 My Computer Forum Forum. All rights reserved.