I have an invoice_correction table that has insurance_type and invoice_date . How to choose columns (insurance_type, invoice_date) so that the dates do not repeat as a result?

I wrote a request:

 select invoice_date, insurance_type from invoice_correction group by invoice_date 

but I get the error:

ERROR: column "invoice_correction.insurance_type" must be used in an aggregate function

  • How to choose columns (insurance_type, invoice_date) so that the dates do not repeat as a result? Well, there are two different types for one date ... which one should be back? - Akina

0