delete from plan_table;

explain plan set statement_id = 'Z_MAKSEM' for 
  select a2 
    from a 
    where a1 = (select max(a1) from a);
@explain z_maksem 


explain plan set statement_id = 'Z_ALLEM' for
  select a2 
    from a 
    where a1 >= all (select a1 from a);
@explain z_allem 

explain plan set statement_id = 'GROUP_BY_PO_KLUCZU' for
  select a1, count(*) 
    from a 
    group by a1;
@explain group_by_po_kluczu

explain plan set statement_id = 'GROUP_BY_NIE_PO_KLUCZU' for
  select a2, count(*) 
    from a 
    group by a2;
@explain group_by_nie_po_kluczu
