Ask a Question related to Coldfusion Database Access, Design and Development.
-
Samurai_Sjakkie #1
mysql - coldfusion
how can i translate the following to work in a clodfusion query?
i want it to give me the amount of items ordered. the total cost and the
total vat paid. but as the vat is a percentage of the cost i need to divide it
by 100 and then bij the average VAT....
select sum(Quantity) , sum(Cost) , sum(Cost)/100 * avg(VAT)
from Purchases
Order BY Quantity
Samurai_Sjakkie Guest
-
Coldfusion MX 7.x and MYSQL - again
Hi, would welcome help in connecting Coldfusion MX 7.1 to MYSQL on a system running: XP Service Pack 2 Coldfusion MX 7.1 using the... -
coldfusion mysql
Connection verification failed for data source: coldfusion java.sql.SQLException: Communication failure during handshake. Is there a server running... -
How to use MySQL 5.0 with ColdFusion MX 7?
Hi, I'm currently using MySQL 4.1 with Cold Fusion MX 7 and everything is working fine. Now, MySQL have released the 5.0 version which... -
ColdFusion & MySQL
Hi, I'm a student working on ColdFusion/MySQL project, with a home PC configuration of MySQL 4.1.x, IIS on XP Pro and CF MX 6.1 (Developer... -
ColdFusion MX and mySQL
Hi, I'm having trouble connecting ColdFusion MX (cevelopers edition running on my home win2k PC) to a mySQL database - I just keep getting connection... -
PaulH *ACE* #2
Re: mysql - coldfusion
Samurai_Sjakkie wrote:
not sure what you're asking but maybe something like this?> how can i translate the following to work in a clodfusion query?
> i want it to give me the amount of items ordered. the total cost and the
> total vat paid. but as the vat is a percentage of the cost i need to divide it
> by 100 and then bij the average VAT....
>
SELECT SUM(Quantity) AS quantitySum, SUM(Cost) AS costSum, SUM(Cost)/100 *
AVG(VAT) AS something
FROM Purchases
since this should return only one row i guess you won't need the ORDER BY clause.
PaulH *ACE* Guest



Reply With Quote

