SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23185' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23189' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23177' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23181' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23161' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23165' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23153' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik
SELECT DISTINCT ON (id_cenik) c.*, k.vat_cz AS vat FROM slim.helios_ceny AS c JOIN slim.heilos_k_karty AS k ON k.id = c.id_k_karta AND k.article_number = '010.23157' WHERE c.id_cenik IN ('1', '8') AND c.id_mena = 'PLN' ORDER BY id_cenik

Downhill