:-eval(consult("utils.prova")).

:- eval(uniprot_use_001()).

location(database,bikestore,"jdbc:mysql://localhost/bikestore","robot","robert").

uniprot_use_001() :-
	dbopen(bikestore,DB),
	println(["==========================bikestore use 001=========================="]),
	issue_query(DB).

issue_query(DB) :-
	println(["---------------------------------------------------------------------"]),
	println(["The first 10 counts of terms with the same name and counts>4:"]),
   % The equivalent SELECT statement is:
   % select name,count(*) from term group by name having count(*)>4 limit 10
	sql_select(DB,bikes,[manufacturer,M],[count(*),C],[options,'limit 10']),
	println([M,C],"->").
