Comments (5)
Get events;
SELECT events.ID,eventName, CAST(AVG(entries) AS Integer), CAST(AVG(eventPosition) AS Integer), CAST((100/(AVG(entries))*AVG(eventPosition)) AS Integer)
FROM events
LEFT OUTER JOIN eventData ON eventData.eventID = events.ID
LEFT OUTER JOIN results ON results.eventID = events.ID
WHERE eventType = 'EFC' AND catID = 6AND fencerClubID = 415
GROUP BY eventName
ORDER BY CAST((100/(AVG(entries))*AVG(eventPosition)) AS Integer) ASC
from web.
SELECT
SUM(CASE WHEN eventPosition = 1 THEN 1 ELSE 0 END) AS first,
SUM(CASE WHEN eventPosition = 2 THEN 1 ELSE 0 END) AS second,
SUM(CASE WHEN eventPosition = 3 THEN 1 ELSE 0 END) AS third,
SUM(CASE WHEN eventPosition > 3 AND eventPosition < 9 THEN 1 ELSE 0 END) AS last8,
SUM(CASE WHEN eventPosition > 8 AND eventPosition < 17 THEN 1 ELSE 0 END) AS last16,
SUM(CASE WHEN eventPosition > 16 AND eventPosition < 33 THEN 1 ELSE 0 END) AS last32,
SUM(CASE WHEN eventPosition > 32 AND eventPosition < 65 THEN 1 ELSE 0 END) AS last64,
SUM(CASE WHEN eventPosition > 64 AND eventPosition < 129 THEN 1 ELSE 0 END) AS last128,
SUM(CASE WHEN eventPosition > 128 AND eventPosition < 257 THEN 1 ELSE 0 END) AS last256,
SUM(CASE WHEN eventPosition > 256 AND eventPosition < 513 THEN 1 ELSE 0 END) AS last512
FROM results
LEFT OUTER JOIN events ON events.ID = results.eventID
LEFT OUTER JOIN eventData ON eventData.eventID = results.eventID AND results.dateID = eventData.dateID where eventData.catID=6 AND results.eventCat=6 AND eventType = 'EFC' AND fencerClubID = 415
from web.
https://epee.me/__old__/euro.php
from web.
Remove 9999s from average position calculation (Italy, Girls, 2019 or 18 I think it was).
from web.
Working live at https://epee.me/efcEventHistory.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)
- Enhance Ophardt import to include U23, Junior & Senior data HOT 1
- Clubs - add graph that shows active fencers by year HOT 1
- FIE Results Import HOT 3
- Missing 2019 Senior Results HOT 4
- Olimpici results & translations HOT 2
- Fix W3 Validation Errors HOT 1
- Cadet Rankings HOT 2
- Regional results
- Olimpici 2 Results
- Create logo assets HOT 1
- EFC Cadet Performance Percentages HOT 6
- British Fencing result parser
- Event % year on year entries change HOT 3
- EFC historical results (pre-2010) HOT 14
- Club page
- European Junior Championships missing results HOT 3
- EFC Cadet Winner Analysis
- Wingerworth Epee Series HOT 1
- Cadet & Junior Euros Analysis HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.