Ver Mensaje Individual
  #10 (permalink)  
Antiguo 09/09/2009, 13:00
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Consulta Mysql - Solo suma una fila

Ahora sí.

Esto es lo que buscas?
Código mysql:
Ver original
  1. mysql> select e.id_categoria_gastos,e.fecha,cg.categoria_gastos,e.gastos from employee e inner join categoria_gastos cg using(id_categoria_gastos);
  2. +---------------------+------------+------------------+--------+
  3. | id_categoria_gastos | fecha      | categoria_gastos | gastos |
  4. +---------------------+------------+------------------+--------+
  5. |                 217 | 2009-07-02 | Transferencia    |   2999 |
  6. |                 167 | 2009-06-01 | Esponsor         |    170 |
  7. |                 167 | 2009-06-01 | Esponsor         |     70 |
  8. |                 167 | 2009-06-01 | Esponsor         |    170 |
  9. |                 170 | 2009-06-01 | Gastos bancarios |   1.19 |
  10. |                 192 | 2009-06-01 | Moviles          | 220.59 |
  11. +---------------------+------------+------------------+--------+
  12. 6 rows in set (0.00 sec)
  13.  
  14. mysql>
__________________
Without data, You are another person with an opinion.
W. Edwads Deming