Changeset - ed00726edba5
[Not reviewed]
default
0 1 0
Laman - 7 years ago 2018-04-01 13:59:11

fix populationAge pro hráče měnící země. 14586913 2006
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
queries.py
Show inline comments
 
@@ -123,14 +123,14 @@ def populationAge(year,country):
 
	query="""
 
		select date(?)-min_datum-1 as playing_years,count(pin)
 
			from (
 
				select ppt1.pin,min(ppt1.datum) as min_datum
 
					from players_performance_tournaments as ppt1
 
						join players_performance_tournaments as ppt2 on ppt1.pin=ppt2.pin
 
					where ppt2.datum>=date(?) and ppt2.datum<date(?) and ppt1.p_country_code=?
 
					group by ppt1.pin
 
					where ppt2.datum>=date(?) and ppt2.datum<date(?) and ppt2.p_country_code=?
 
					group by ppt2.pin
 
			)
 
			group by playing_years
 
	"""
 

	
 
	res=cursor.execute(query,(date2,date1,date2,country))
 
	print("celé roky hraní\tpočet hráčů")
 
@@ -151,10 +151,10 @@ def tournamentAttendance(year):
 

	
 

	
 
# playerYear("Kotowski Jaroslav",2017)
 
# yearByCountry(2017)
 
# timeRank(2017,"CZ")
 
# populationStrength(2017,"CZ")
 
# populationAge(2017,"CZ")
 
# populationAge(2006,"CZ")
 
# tournamentAttendance(2010)
 
# yearsByCountry(2001,2018)
 
# populationStrength(2017,2018,"CZ")
0 comments (0 inline, 0 general)