Skip to main content
codigo editado
Fonte Link
alexjosesilva
  • 3,2mil
  • 11
  • 56
  • 96

Tenho um select que exibe os nomes, data e valores pagos por clientes. Devo fazer exibir uma lista sem repetir os nomes.

SELECT  
    c.name,
    p.created_at,
    p.amount_paid
FROM 
    receipts as r, 
    payments as p, 
    payment_status as ps, 
    receipt_status as rs,
    clients as c
WHERE 
  ps.id = p.payment_status_id AND
  p.created_at < CURRENT_DATE AND p.created_at > CURRENT_DATE -199

post

Tenho um select que exibe os nomes, data e valores pagos por clientes. Devo fazer exibir uma lista sem repetir os nomes.

SELECT  
    c.name,
    p.created_at,
    p.amount_paid
FROM 
    receipts as r, 
    payments as p, 
    payment_status as ps, 
    receipt_status as rs,
    clients as c
WHERE 
  ps.id = p.payment_status_id AND
  p.created_at < CURRENT_DATE AND p.created_at > CURRENT_DATE -199

post

Tenho um select que exibe os nomes, data e valores pagos por clientes. Devo fazer exibir uma lista sem repetir os nomes.

SELECT  
    c.name,
    p.created_at,
    p.amount_paid
FROM 
    payments as p, 
    clients as c
WHERE 
  p.created_at < CURRENT_DATE AND p.created_at > CURRENT_DATE -199

post

Fonte Link
alexjosesilva
  • 3,2mil
  • 11
  • 56
  • 96

SQl no PostgreSQL: Não Repetir Valores de uma campo da Table

Tenho um select que exibe os nomes, data e valores pagos por clientes. Devo fazer exibir uma lista sem repetir os nomes.

SELECT  
    c.name,
    p.created_at,
    p.amount_paid
FROM 
    receipts as r, 
    payments as p, 
    payment_status as ps, 
    receipt_status as rs,
    clients as c
WHERE 
  ps.id = p.payment_status_id AND
  p.created_at < CURRENT_DATE AND p.created_at > CURRENT_DATE -199

post