Code Monkey home page Code Monkey logo

Comments (6)

epeeme avatar epeeme commented on June 14, 2024
SELECT results.fencerID, fencerFirstname, fencerSurname, yob, clubName, efr, count(*) AS comps,  SUM((100 / entries) * eventPosition) / count(*) AS InterPerc
FROM results 
LEFT OUTER JOIN eventData ON eventData.eventID = results.eventID AND eventData.dateID = results.dateID
LEFT OUTER JOIN fencers ON fencers.ID = results.fencerID 
LEFT OUTER JOIN events ON events.ID = results.eventID     
LEFT JOIN clubs ON clubs.ID = (SELECT clubs.ID FROM results AS r 
                                                                  INNER JOIN clubs ON r.fencerClubID = clubs.ID 
                                                                  INNER JOIN eventDates ON r.dateID = eventDates.ID 
                                                                  WHERE fencers.ID = r.fencerID AND cty = 1
                                                                  ORDER BY eventDates.fullDate DESC LIMIT 0,1)
WHERE eventData.catID = 6 AND results.eventCat = 6 AND (fencers.country IN ('ENG', 'SCO', 'WAL', 'GBR', 'NIR', 'GUE') OR clubName = 'Great Britain')
AND eventType = 'EFC'
GROUP BY results.fencerID
ORDER BY InterPerc ASC

from web.

epeeme avatar epeeme commented on June 14, 2024
SELECT results.fencerID, fencerFirstname, fencerSurname, yob, clubName, efr, count(*) AS comps,  SUM((100 / entries) * eventPosition) / count(*) AS InterPerc
FROM results 
INNER JOIN eventData ON eventData.eventID = results.eventID AND eventData.dateID = results.dateID
INNER JOIN fencers ON fencers.ID = results.fencerID 
INNER JOIN events ON events.ID = results.eventID     
LEFT JOIN clubs ON clubs.ID = results.fencerClubID
WHERE eventData.catID = 6 AND results.eventCat = 6 
AND (clubName = 'Great Britain')
AND eventType = 'EFC'
GROUP BY results.fencerID  
ORDER BY `InterPerc` ASC

from web.

epeeme avatar epeeme commented on June 14, 2024
SELECT
 results.fencerID, fencerFirstname, fencerSurname, yob, clubName, efr, count(*) AS comps,  
 SUM((100 / entries) * eventPosition) / count(*) AS InterPerc
FROM results 
INNER JOIN eventData ON eventData.eventID = results.eventID AND eventData.dateID = results.dateID
INNER JOIN eventDates ON eventDates.eventID = eventData.eventID AND eventDates.ID = results.dateID
INNER JOIN fencers ON fencers.ID = results.fencerID 
INNER JOIN events ON events.ID = results.eventID     
LEFT JOIN clubs ON clubs.ID = results.fencerClubID
WHERE eventData.catID = 6 AND results.eventCat = 6 AND (clubName = 'Great Britain') AND eventType = 'EFC' 
  AND (fullDate > '2018-04-20' AND fullDate < '2019-04-20')
GROUP BY results.fencerID

from web.

epeeme avatar epeeme commented on June 14, 2024

Handles complex headers for export;
http://jsfiddle.net/RajReddy/jzdjdo3z/21/

from web.

epeeme avatar epeeme commented on June 14, 2024

Add in an indicator for those that qualified for the Euros / Worlds.

from web.

epeeme avatar epeeme commented on June 14, 2024

Working live at https://epee.me/efcHistory.php - a bit sketchy on mobile, but due to the amount of data this is really something for use on devices with bigger screens.

from web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.