select snapnum,count(*) as ngroups_db from MDPL.FOF3 group by snapnum order by snapnum
/* PaQu: QID 67377781 _/ CREATE DATABASE IF NOT EXISTS spider_tmp_shard; USE spider_tmpshard;
/ PaQu: QID 67377781 _/ CREATE TABLE spider_tmp_shard.aggregation_tmp72263736 ENGINE=MyISAM SELECT snapnum AS snapnum,COUNT() AS ngroups_db FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL LIMIT 0;
/* PaQu: QID 67377781 _/ SELECT spider_bg_direct_sql('CREATE DATABASE IF NOT EXISTS spider_tmpshard; / PaQu: QID 67377781 _/ CREATE TABLE spider_tmp_shard.aggregation_tmp_72263736 ENGINE=FEDERATED CONNECTION="XXXXX/spider_tmp_shard/aggregation_tmp72263736" SELECT snapnum AS snapnum,COUNT() AS ngroups_db FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL LIMIT 0;', '', concat('host "', __sp__.host ,'", port "', __sp__.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as __sp__;
/* PaQu: QID 67377781 / SELECT spider_bg_directsql('/ PaQu: QID 67377781 _/ USE spider_tmpshard; / PaQu: QID 67377781 _/ INSERT INTO spider_tmp_shard.aggregation_tmp72263736 SELECT snapnum AS snapnum,COUNT() AS ngroups_db FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL ', '', concat('host "', __sp__.host ,'", port "', __sp__.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as __sp__;
/* PaQu: QID 67377781 / CREATE TABLE multidark_user_admin.mdpl_count_fof3 ENGINE=MyISAM SELECT DISTINCT @i:=@i+1 AS row_id, snapnum,SUM(ngroups_db) AS ngroups_db
FROM aggregation_tmp_72263736 GROUP BY snapnum ORDER BY snapnum ASC;
/ PaQu: QID 67377781 / SELECT spider_bg_directsql('/ PaQu: QID 67377781 _/ DROP TABLE spider_tmp_shard.aggregation_tmp_72263736', '', concat('host "', __sp__.host ,'", port "', __sp__.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as __sp__;
/ PaQu: QID 67377781 */ DROP TABLE spider_tmp_shard.aggregation_tmp_72263736;
select snapnum,count(*) as ngroups_db from MDPL.FOF3 group by snapnum order by snapnum
/* PaQu: QID 67377781 _/ CREATE DATABASE IF NOT EXISTS spider_tmp_shard; USE spider_tmpshard; / PaQu: QID 67377781 _/ CREATE TABLE spider_tmp_shard.aggregation_tmp72263736 ENGINE=MyISAM SELECT snapnum AS
snapnum
,COUNT() ASngroups_db
FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL LIMIT 0; /* PaQu: QID 67377781 _/ SELECT spider_bg_direct_sql('CREATE DATABASE IF NOT EXISTS spider_tmpshard; / PaQu: QID 67377781 _/ CREATE TABLE spider_tmp_shard.aggregation_tmp_72263736 ENGINE=FEDERATED CONNECTION="XXXXX/spider_tmp_shard/aggregation_tmp72263736" SELECT snapnum ASsnapnum
,COUNT() ASngroups_db
FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL LIMIT 0;', '', concat('host "',__sp__
.host ,'", port "',__sp__
.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as__sp__
; /* PaQu: QID 67377781 / SELECT spider_bg_directsql('/ PaQu: QID 67377781 _/ USE spider_tmpshard; / PaQu: QID 67377781 _/ INSERT INTO spider_tmp_shard.aggregation_tmp72263736 SELECT snapnum ASsnapnum
,COUNT() ASngroups_db
FROM MDPL.FOF3 GROUP BY snapnum ORDER BY NULL ', '', concat('host "',__sp__
.host ,'", port "',__sp__
.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as__sp__
; /* PaQu: QID 67377781 / CREATE TABLE multidark_user_admin.mdpl_count_fof3
ENGINE=MyISAM SELECT DISTINCT @i:=@i+1 ASrow_id
,snapnum
,SUM(ngroups_db
) ASngroups_db
FROMaggregation_tmp_72263736
GROUP BYsnapnum
ORDER BYsnapnum
ASC; / PaQu: QID 67377781 / SELECT spider_bg_directsql('/ PaQu: QID 67377781 _/ DROP TABLE spider_tmp_shard.aggregation_tmp_72263736', '', concat('host "',__sp__
.host ,'", port "',__sp__
.port ,'", user "msandbox"')) from (select * from mysql.spidertables group by host, port) as__sp__
; / PaQu: QID 67377781 */ DROP TABLE spider_tmp_shard.aggregation_tmp_72263736;