Results 1 to 4 of 4
  1. Default A little MySQL help


    I have the following structure:
    brief description

    code


    I need to create a view with the top 5 'nombre_institucion' from the first table with most 'delitos' (entries in antecedente_delito).
    Basically the result I need in the view is:

    Nombre_institucionnumero_delitos
    inst132
    inst230
    inst325
    inst418
    inst510

  2. Certified Pimento Bi Male
    IGN: xxxxFenixR
    Server: Bera
    Level: Mix
    Job: Severals
    Guild: None
    Alliance: Nada
    Farm: Wut?
    venezuela

    Default Re: A little MySQL help


    Screw this im writing in spanish:

    No puedo recordar los codigos ahorita, pero se que necesitas relacionar la tabla que tiene los nombres de las instituciones con la tabla que tiene los delitos, despues tienes que hacerle un "order by" descendente (Creo que es ese el que va de menor a mayor), despues tienes que hacer una condicion para que te de los primeros 5 resultados de ese order by para mostrarlos.

  3. Default Re: A little MySQL help


    The descending order and limit are easy, I'm stuck on how to relate both tables, since I have to go through like 3 in between.

  4. Certified Pimento Bi Male
    IGN: xxxxFenixR
    Server: Bera
    Level: Mix
    Job: Severals
    Guild: None
    Alliance: Nada
    Farm: Wut?
    venezuela

    Default Re: A little MySQL help


    Tenes que traertelas contigo, porque sino, no relacionara los datos y no te traera nada. Lo que si no me acuerdo es como ocultar los campos que no quieres mostrar.

    Si tuviera access en esta maquina te haria la relacion facilmente desde las tablas graficas que tiene.

  5.  

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •