I have a baseball table that contains the fields: atbats, runs, rbis, singles, doubles, triples
I want to run a query that is sorted by batting avg [(singles+doubles+triples+hrs)/atbats]. Is there a way to create a variable within the query and then sort it by that variable.
I'm using mySQL as the db server and Coldfusion to spit out the data.
Thanks in advance.
I want to run a query that is sorted by batting avg [(singles+doubles+triples+hrs)/atbats]. Is there a way to create a variable within the query and then sort it by that variable.
I'm using mySQL as the db server and Coldfusion to spit out the data.
Thanks in advance.
