Jump to content

sql query error


alin19

Recommended Posts

select * from (select id_port, id_bo, simbol, volum  from `portofolii` where id_bo='se28'  order by `id_port` desc) group by `id_port`

 

 

what i have wrong in this query?

here:

( select id_port, id_bo, simbol, volum  from `portofolii` where id_bo='se28'  order by `id_port` desc)  i try order desc all my database and there group by simbol,

Link to comment
https://forums.phpfreaks.com/topic/97664-sql-query-error/
Share on other sites

yes this works, but just turns my database upside down

 

 

now i need to make something like this:

 

 

select * from (select id_port,id_bo, simbol, volum  from `portofolii` where id_bo='se28' order by `id_port` desc, `simbol` asc) group by `simbol`

 

to select from this query, but i get this error:

 

#1248 - Every derived table must have its own alias

Link to comment
https://forums.phpfreaks.com/topic/97664-sql-query-error/#findComment-499713
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.