done some changes with files and folders

This commit is contained in:
Ghassan Yusuf 2020-02-16 04:29:43 +03:00
parent 49e7437cb7
commit 24dd8e1d46
18 changed files with 15836 additions and 0 deletions

View File

@ -0,0 +1,8 @@
SELECT
*
FROM
wta_league.weightclasses
WHERE
category = 'YOUTH' /*AND gender = 'FEMALE'*/
ORDER BY
category, gender, maxWeight;

View File

@ -0,0 +1,4 @@
Files : https://files.000webhost.com/
Database : https://databases-auth.000webhost.com/index.php
User : jakanonimotest
Password : Sacamoko.123

View File

@ -0,0 +1,52 @@
SET @a:=0;
SELECT
@a:=@a+1 No,
person.id as 'Person ID',
UPPER(CONCAT(fname, ' ', lname)) as 'NAME',
YEAR(CURDATE()) - YEAR(person.date_of_birth)as 'AGE',
person.weight as 'WEIGHT',
weightclasses.category as 'CATEGORY',
person.gender as 'GENDER',
/*weightclasses.classTitle as 'TITLE',*/
weightclasses.maxWeight as 'UW',
weightclasses.className as 'NAME',
clubs.title as 'CLUB'
FROM person
LEFT JOIN
clubs
ON
person.clubID = clubs.id
LEFT JOIN
weightclasses
ON
YEAR(CURDATE()) - YEAR(person.date_of_birth) BETWEEN weightclasses.minAge AND weightclasses.maxAge
WHERE
weightclasses.gender = person.gender and
person.weight > weightclasses.minWeight and
person.weight <= weightclasses.maxWeight
/*
AND
weightclasses.category = 'SENIOR'
AND
weightclasses.gender = 'MALE'
AND
weightclasses.className = 'UNDER 68'
*/
ORDER BY
weightclasses.category,
weightclasses.gender,
weightclasses.minWeight,
weightclasses.classTitle,
person.fname,
person.lname,
YEAR(CURDATE()) - YEAR(person.date_of_birth)

View File

@ -0,0 +1 @@
select to_country.iso3 as 'iso3', to_country.name as 'country', to_members.bloodtype as 'blood', count(*) as 'count' FROM to_country left join to_members on to_members.country = to_country.iso3 where not to_members.bloodtype = "I d" group by to_members.bloodtype, to_country.iso3 order by to_country.name, to_members.bloodtype asc

View File

@ -0,0 +1 @@
select to_country.iso3 as 'iso3', to_country.name as 'country', count(*) as 'count', round(((count(*)/(select count(*) from to_members)) * 100), 1) as 'percent' from to_members left join to_country on to_country.iso3 = to_members.country group by country order by count(*) desc

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
set @club = 25;
set @activity = (select id from to_activities where name like concat('%', 'taekwondo', '%') limit 1);
set @student = 'gents';
set @startTime = (select STR_TO_DATE('7:40 PM', '%l:%i %p' ));
set @endTime = (select STR_TO_DATE('8:40 PM', '%l:%i %p' ));
insert into to_clubs_classes (club, activity, studentType, startTime, endTime) values (@club, @activity, @student, @startTime, @endTime);
SELECT * FROM takeone_platform.to_clubs_classes;

View File

@ -0,0 +1,10 @@
/* Data To Be Inserted */
Set @origin = upper('british');
Set @name = upper('boxing');
Set @link = 'https://en.wikipedia.org/wiki/Boxing';
/* Query To Insert Data Into Activities Table */
insert into to_activities (origin, name, link) values ((select iso3 from to_country where to_country.name like concat('%', @origin, '%')), @name, @link);
/* Query To Display The List */
SELECT * FROM takeone_platform.to_activities;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
/* I am building this function to be used for listing clubs classes */
select
/* This section is to get club data */
upper(to_clubs.id) as 'clubId',
upper(to_clubs.title) as 'clubName',
to_clubs.logo as 'clubLogo',
/* This section is to get trainer data */
to_members.id as 'trainerId',
concat(to_members.fname, " ", to_members.lname) as 'trainerName',
to_members.picture as 'trainerPicture',
to_activities.id as 'activityId',
to_activities.name as 'activityName',
/* This section is to get class data */
to_clubs_classes.id as 'classId',
upper(to_clubs_classes.studentType) as 'classStudents',
to_clubs_classes.startTime as 'classStart',
to_clubs_classes.endTime as 'classEnd',
TIMEDIFF(to_clubs_classes.endTime, to_clubs_classes.startTime) as 'classDuration',
to_clubs_classes.studentLimit as 'classlimit',
/* This section is to calculate the number of class members */
(select count(*) from to_clubs_payments where to_clubs_payments.class = to_clubs_classes.id) as 'classMembers',
/* This section is to find out if the class is vacant or full */
if(false, upper('full'), upper('vacant')) AS 'classStatus'
from
/* Source Table */
to_clubs_classes
/* Linked Tables */
left join to_clubs on to_clubs_classes.club = to_clubs.id
left join to_activities on to_clubs_classes.activity = to_activities.id
left join to_members on to_clubs_classes.trainner = to_members.id

View File

@ -0,0 +1,7 @@
SELECT * FROM to_taekwondo_sparring_weightclasses
where
84.9 between minWeight and maxWeight
and
timestampdiff(year, '1983-01-30', curdate()) between minAge and maxAge
and
gender = 'MALE'

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,19 @@
/* Set Less Frequent Variables */
set @wcCateg = 'YOUTH'; /* 'SENIOR', 'JUNIOR', 'ULTRA', 'CADET', 'YOUTH' */
set @minAge = 10; set @maxAge = 11; /* [17, 32], [15, 17], [33, 46], [12, 14], [10, 11] */
/* Set Mare Frequent Variables */
set @wcTitle = 'HEAVY'; /* 'FIN', 'FLY', 'BANTAM', 'FEATHER', 'LIGHT', 'WELTER', 'MIDDLE', 'HEAVY' */
set @minMaleWeight = 40; set @maxMaleWeight = 300;
set @minFemaleWeight = 40; set @maxFemaleWeight = 300;
/* MALE Weight Category */
INSERT INTO to_taekwondo_sparring_weightclasses (title, gender, category, minAge, maxAge, minWeight, maxWeight)
VALUES (@wcTitle, 'MALE', @wcCateg, @minAge, @maxAge, @minMaleWeight, @maxMaleWeight);
/* FEMALE Weight Category */
INSERT INTO to_taekwondo_sparring_weightclasses (title, gender, category, minAge, maxAge, minWeight, maxWeight)
VALUES (@wcTitle, 'FEMALE', @wcCateg, @minAge, @maxAge, @minFemaleWeight, @maxFemaleWeight);
/* Display All Data Available */
/* truncate to_taekwondo_sparring_weightclasses; */
SELECT * FROM takeone_platform.to_taekwondo_sparring_weightclasses order by id desc;

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB