ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

BAse De Datos Putos


Enviado por   •  27 de Febrero de 2015  •  396 Palabras (2 Páginas)  •  158 Visitas

Página 1 de 2

1 row in set (0.00 sec)

mysql> select matricula, max(total) from vendedor_producto;

ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GR

OUP columns is illegal if there is no GROUP BY clause

mysql> select matricula, max(total) from vendedor_producto;

ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GR

OUP columns is illegal if there is no GROUP BY clause

mysql> select matricula, max(total) from vendedor_producto

-> group by matricula;

+-----------+------------+

| matricula | max(total) |

+-----------+------------+

| 1ab | 400 |

| 2cd | 3120 |

| 3fg | 560 |

| 4hg | 20 |

| 5yu | 2175 |

+-----------+------------+

5 rows in set (0.07 sec)

mysql> select 'venta' from max(total)

-> union

-> select 'venta' from ,

-> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

corresponds to your MySQL server version for the right syntax to use near 'max(t

otal)

union

select 'venta' from ,' at line 1

mysql> select 'venta',max(total) from vendedor_producto;

+-------+------------+

| venta | max(total) |

+-------+------------+

| venta | 3120 |

+-------+------------+

1 row in set (0.00 sec)

mysql> select 'venta',max(total) from vendedor_producto;

+-------+------------+

| venta | max(total) |

+-------+------------+

| venta | 3120 |

+-------+------------+

1 row in set (0.00 sec)

mysql> select 'venta',max(total) from vendedor_producto

-> union

-> select matricula from vendedor_producto;

ERROR 1222 (21000): The used SELECT statements have a different number of column

s

mysql> select matricula, max(total) from vendedor_producto

-> group by matricula;

+-----------+------------+

| matricula | max(total) |

+-----------+------------+

| 1ab | 400 |

| 2cd | 3120 |

| 3fg | 560 |

| 4hg | 20 |

| 5yu | 2175 |

+-----------+------------+

5 rows in set (0.00 sec)

mysql>

...

Descargar como (para miembros actualizados) txt (2 Kb)
Leer 1 página más »
Disponible sólo en Clubensayos.com