MySQL Forums
Forum List  »  Spanish

sub query?
Posted by: alvaro salinas
Date: September 05, 2007 11:37PM

hola amigos, como hago el query para que me pueda desplegar lo siguiente:

tengo una tabla bono, la cual tiene los siguientes campos con algunos datos:

vol_corr, vol_cod, vol_fecha, vol_saldo

1, 90, 2/1/2007, 50
2, 90, 2/2/2007, 60
3, 90, 2/3/2007, 50
4, 210, 3/5/2007, 100
5, 210, 3/6/2007, 150
6. 210, 3/7/2007, 160
7, 250, 5/9/2007, 80
8, 250, 5/10/2007, 90
9, 250, 5/15/2007, 10


lo que quiero que me salga es que me agrupe por vol_cod, pero que me salgan todas las fechas, y los saldos, ej

vol_cod=90
90, 2/1/2007
90, 2/2/2007
90, 2/3/2007

o

vol_cod=250
250, 5/9/2007, 80
250, 5/10/2007, 90
250, 5/15/2007, 10

saludos

Options: ReplyQuote


Subject
Views
Written By
Posted
sub query?
3327
September 05, 2007 11:37PM
1961
September 06, 2007 08:02AM
2537
September 06, 2007 09:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.