logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

RE: This doesn't make any sense to me...: msg#00097

db.mysql.windows

Subject: RE: This doesn't make any sense to me...

Ok (I had to delete the original due to 30k limit on the mailing list),

Here's my first query completed. It's fast as heck too =)
SELECT resMemID
, exp_member_data.m_field_id_1
, exp_member_data.m_field_id_2
, SUM( penIncident ) AS totPoints
FROM s_races_results
INNER JOIN exp_member_data
ON exp_member_data.member_id = resMemID
INNER JOIN exp_members
ON exp_members.member_id = resMemID
LEFT JOIN s_races_penalties
ON penMemID = resMemID
WHERE resRacID =80
GROUP BY resMemID
, exp_member_data.m_field_id_1
, exp_member_data.m_field_id_2
ORDER BY exp_members.member_id

Now the exp_members and exp_member_data have a 1 to 1. In reality I wanted
a list of all the members from a given race and the penalties for each of
them so I decided I need to work off that table to being with. The members
from the s_races_results are not optional, but the s_races_penalties
information is, given that a member may not be in the penalty table but in
the s_races_results table. It is also possible that a member may be listed
more than once in the s_races_penalties table, hence the reason I reordered
everything to what you see here.

This is the first one. Works like a champ. What do you think?


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo