IIabm/SQL_running_check.sql

36 lines
1.2 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

select id, e_id, idx_sample, seed, ts_done from iiabmdb.without_exp_sample where is_done_flag != -1 order by ts_done;
select count(id) from iiabmdb.without_exp_sample where is_done_flag != -1;
select count(id) from iiabmdb.without_exp_sample;
select count(id) from iiabmdb.with_exp_sample where is_done_flag != -1;
select * from iiabmdb.with_exp_sample where is_done_flag != 1;
select * from
(select distinct idx_scenario, n_max_trial, crit_supplier, firm_pref_request,
firm_pref_accept, netw_pref_cust_n, netw_pref_cust_size, cap_limit,
diff_new_conn, diff_remove from iiabmdb.with_exp_experiment) as a
inner join
(
select idx_scenario,
sum(n_disrupt_s) as n_disrupt_s, sum(n_disrupt_t) as n_disrupt_t from
iiabmdb.with_exp_experiment as a
inner join
(
select e_id, count(n_s_disrupt_t) as n_disrupt_s,
sum(n_s_disrupt_t) as n_disrupt_t from
iiabmdb.with_exp_sample as a
inner join
(select a.s_id as s_id, count(id) as n_s_disrupt_t from
iiabmdb.with_exp_result as a
inner join
(select distinct s_id from iiabmdb.with_exp_result where ts > 0) as b
on a.s_id = b.s_id
group by s_id
) as b
on a.id = b.s_id
group by e_id
) as b
on a.id = b.e_id
group by idx_scenario) as b
on a.idx_scenario = b.idx_scenario;