clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1811884 fiddles created (25308 in the last week).

CREATE TABLE my_table (property_type text, price integer not null) ; INSERT INTO my_table (property_type, price) VALUES ('FLAT', 5000), ('SEMIDETACHED', 9000), ('FLAT', 6000) ;
3 rows affected
 hidden batch(es)


SELECT array_remove(array_agg(case when my_table.property_type = 'FLAT' then my_table.price end), NULL) as Flat_Current_Asking_Price, array_remove(array_agg(case when my_table.property_type = 'SEMIDETACHED' then my_table.price end), NULL) as Semidetached_Current_Asking_Price FROM my_table;
flat_current_asking_price semidetached_current_asking_price
{5000,6000} {9000}
 hidden batch(es)