Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Verisign Code Signing
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old May 10th, 2003, 08:59 AM
kushal kushal is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 kushal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Sql query ..help plz urgent

Hi i need some help very urgently

i have three tables in a database

and i need to get a report that shows for each scalper, which concert gives him the best return per ticket price (price he paid from the ticket office / cost he charges when selling it) It should return me the scalper name, concert Date and best return

Can u please help..


Scalpers

primary key is scalper and concert
Scalper Concert Cost Number
yea 12/01/2003 $99.00 20
Tony 12/01/2003 $101.00 50
Tony 2/02/2003 $40.00 40
Johnnie 2/02/2003 $39.00 15
Georgie 2/02/2003 $55.00 99
Georgie 7/02/2003 $130.00 99
Johnnie 7/02/2003 $92.00 8
Johnnie 3/03/2003 $40.00 12
Tony 3/03/2003 $42.00 20
Georgie 3/03/2003 $60.00 60
Johnnie 4/03/2003 $150.00 22
Georgie 4/03/2003 $140.00 44
Johnnie 11/03/2003 $150.00 22
Tony 11/03/2003 $100.00 88
Tony 17/03/2003 $50.00 33
Georgie 17/03/2003 $5.00 55
Johnnie 17/03/2003 $55.00 27
Tony 31/03/2003 $55.00 23
Georgie 31/03/2003 $60.00 32
Georgie 4/04/2003 $68.00 22
Tony 4/04/2003 $67.00 21
Georgie 6/05/2003 $60.00 44
Tony 6/05/2003 $60.00 44
Tony 22/05/2003 $30.00 30
Georgie 22/05/2003 $31.00 31
Johnnie 22/05/2003 $32.00 32




Performers Primary key is Performer Performer Music
Tripod Comedy
Tool Hard Rock
Cradle of Filth Metal
The Beatles Pop
Avril Lavigne Pop
Pennywise Punk
Ja Rule Rap
Bob Marley Reggae
B2k RnB
P Diddy RnB
Usher RnB
Incubus Rock
Grinspoon Rock
Justin Timberlake Urban


Concerts Primary key is Date Performer Date Price
Avril Lavigne 12/01/2003 $80.00
The Beatles 25/01/2003 $64.00
Pennywise 30/01/2003 $66.00
Usher 2/02/2003 $30.00
The Beatles 4/02/2003 $16.00
Avril Lavigne 7/02/2003 $79.00
Pennywise 28/02/2003 $66.00
Usher 3/03/2003 $35.00
Avril Lavigne 4/03/2003 $78.00
Avril Lavigne 11/03/2003 $78.00
Incubus 17/03/2003 $48.00
The Beatles 22/03/2003 $8.00
Grinspoon 26/03/2003 $35.00
Incubus 31/03/2003 $49.00
The Beatles 1/04/2003 $32.00
Incubus 4/04/2003 $50.00
Grinspoon 11/04/2003 $35.00
The Beatles 15/04/2003 $4.00
Pennywise 22/04/2003 $66.00
Pennywise 29/04/2003 $66.00
The Beatles 5/05/2003 $2.00
Incubus 6/05/2003 $50.00
Pennywise 11/05/2003 $66.00
Usher 22/05/2003 $25.00
Pennywise 23/05/2003 $66.00



thanks

kushal
Attached Files
File Type: zip concerts.zip (22.6 KB, 247 views)

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Sql query ..help plz urgent


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway