•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 392,068 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,310 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 1594 | Replies: 0
![]() |
•
•
Join Date: Aug 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
I am VERY new to SQL and I do not know if I am word this question correctly, so forgive me.
I would like to create a new table that does calculations on some of the same fields.
• IPA number (from the IPA_Num field)
• Total number of Rx's (sum of rx field )
• Total Paid( sum of amt_paid field)
• Total generic paid (If the field drugs = 1 then sum the amt_paid field)
• Percent generic (If the field drugs = 1 then sum and divide by the sum of the field rx)
• Percent formulary (if the formulary field = A then sum and divide by the rx field)
• Cost difference ( Average amount paid per brand Rx - average amount paid per generic Rx )
Any help is greatly appreciated.
Blessing to all
Yvonne
:eek:
I am VERY new to SQL and I do not know if I am word this question correctly, so forgive me.
I would like to create a new table that does calculations on some of the same fields.
• IPA number (from the IPA_Num field)
• Total number of Rx's (sum of rx field )
• Total Paid( sum of amt_paid field)
• Total generic paid (If the field drugs = 1 then sum the amt_paid field)
• Percent generic (If the field drugs = 1 then sum and divide by the sum of the field rx)
• Percent formulary (if the formulary field = A then sum and divide by the rx field)
• Cost difference ( Average amount paid per brand Rx - average amount paid per generic Rx )
Any help is greatly appreciated.
Blessing to all
Yvonne
:eek:
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
Similar Threads
- Forms in Random access files (Visual Basic 4 / 5 / 6)
- Creating a Boot Disk for an NTFS or FAT Partition (Windows tips 'n' tweaks)
- Creating a Login Page (ASP)
- Creating nice borders the same way they have on vbulletin (Graphics and Multimedia)
- Script stores data in wrong MySQL columns (MySQL)
- PHP help in creating profile thingy (PHP)
- Listbox with Columns (Visual Basic 4 / 5 / 6)
- how to upload Word doc with columns & graphics? (Graphics and Multimedia)
- Creating and destroying objects (C++)
Other Threads in the MySQL Forum
- Previous Thread: Familiar MySQL Error
- Next Thread: MySQL Multiple Table Search


Linear Mode