set linesize 32767 set pagesize 200 set trimspool on set feedback on set heading on prompt ==MEMBRI_POLITICA_7== select count(*) from crm_politici_pret_art where id_pol=7; select id_pol_art, id_articol from crm_politici_pret_art where id_pol=7; prompt ==CATE_LINII_COMENZI_ELEMENTE_ID_POL_7_TOTAL== select count(*), sum(case when cantitate<0 then 1 else 0 end) as negative, sum(case when cantitate>0 then 1 else 0 end) as pozitive from comenzi_elemente where id_pol=7 and sters=0; prompt ==DISTINCT_ARTICOLE_PE_POLITICA_7_IN_COMENZI== select id_articol, count(*), sum(cantitate) from comenzi_elemente where id_pol=7 and sters=0 group by id_articol; prompt ==DONE== exit