Changeset - 8d852e1a7103
[Not reviewed]
default
0 1 0
Laman - 7 years ago 2018-03-27 13:46:11

tournamentAttendance query
1 file changed with 10 insertions and 2 deletions:
0 comments (0 inline, 0 general)
queries.py
Show inline comments
 
@@ -96,8 +96,15 @@ def populationAge(year,country):
 
		print("\t".join([str(x) for x in rec]))
 

	
 

	
 
def tournamentAttendance():
 
	pass
 
def tournamentAttendance(year):
 
	date1=yearStart(year)
 
	date2=yearStart(year+1)
 
	query="""select country_code,sum(player_count) from tournaments where datum>=date(?) and datum<date(?) group by country_code"""
 

	
 
	res=cursor.execute(query,(date1,date2))
 
	print("kód země\tpočet hráčů na turnajích")
 
	for rec in res:
 
		print("\t".join([str(x) for x in rec]))
 

	
 

	
 
# playerYear("Kotowski Jaroslav",2017)
 
@@ -105,3 +112,4 @@ def tournamentAttendance():
 
# timeRank(2017,"CZ")
 
# populationStrength(2017,"CZ")
 
# populationAge(2017,"CZ")
 
# tournamentAttendance(2010)
0 comments (0 inline, 0 general)