Select Distinct ou Group By
Pessoal tenho uma tabela no php cujo resultado do select vindo do bd vem no seguinte formato:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[26](http://localhost:8080/phpmyadmin/sql.php?db=kadambd&table=estabelecimento&pos=0&sql_query=SELECT+%2A+FROM+%60kadambd%60.%60estabelecimento%60+WHERE+%60CodigoEstabelecimento%60+%3D+26&token=4ebacc84172706eefc7786267f04171e) 46 15/05/2019 13:57:25 Dinheiro Pendente Bacon Cheddar 160.00
[26](http://localhost:8080/phpmyadmin/sql.php?db=kadambd&table=estabelecimento&pos=0&sql_query=SELECT+%2A+FROM+%60kadambd%60.%60estabelecimento%60+WHERE+%60CodigoEstabelecimento%60+%3D+26&token=4ebacc84172706eefc7786267f04171e) 46 15/05/2019 13:57:25 Dinheiro Pendente Chicken Club Sandwich 145.00
[26](http://localhost:8080/phpmyadmin/sql.php?db=kadambd&table=estabelecimento&pos=0&sql_query=SELECT+%2A+FROM+%60kadambd%60.%60estabelecimento%60+WHERE+%60CodigoEstabelecimento%60+%3D+26&token=4ebacc84172706eefc7786267f04171e) 46 15/05/2019 13:57:25 Dinheiro Pendente Philly Cheese Steak 150.00
[26](http://localhost:8080/phpmyadmin/sql.php?db=kadambd&table=estabelecimento&pos=0&sql_query=SELECT+%2A+FROM+%60kadambd%60.%60estabelecimento%60+WHERE+%60CodigoEstabelecimento%60+%3D+26&token=4ebacc84172706eefc7786267f04171e) 46 15/05/2019 13:57:25 Dinheiro Pendente Smoke House 155.00
[26](http://localhost:8080/phpmyadmin/sql.php?db=kadambd&table=estabelecimento&pos=0&sql_query=SELECT+%2A+FROM+%60kadambd%60.%60estabelecimento%60+WHERE+%60CodigoEstabelecimento%60+%3D+26&token=4ebacc84172706eefc7786267f04171e) 46 15/05/2019 13:57:25 Dinheiro Pendente Stream Miller 135.00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
E eu gostaria de fazer um select para que nao repita os dados iguais e que a tabela viesse assim:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
46 15/05/2019 13:57:25 Dinheiro Pendente Bacon Cheddar 160.00
Chicken Club Sandwich 145.00
Philly Cheese Steak 150.00
Smoke House 155.00
[26](http://localhost:8080/phpmyadmin/sql.php?db=kadambd&table=estabelecimento&pos=0&sql_query=SELECT+%2A+FROM+%60kadambd%60.%60estabelecimento%60+WHERE+%60CodigoEstabelecimento%60+%3D+26&token=4ebacc84172706eefc7786267f04171e) 46 15/05/2019 13:57:25 Dinheiro Pendente Stream Miller 135.00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Discussão (0)
Carregando comentários...