Publi

Cariño, quieres algo de postre? [SQL en la vida real]

Mientras yo, absorto en mis pensamientos digo:

1
2
SELECT * FROM Frigorifico WHERE AND Tipo='Yogur' AND Caducidad IN
     (SELECT MIN(Caducidad) FROM Frigorifico WHERE AND Tipo='Yogur' AND Caducidad>=NOW());

Y mi pareja me mira con una cara de no entender demasiado, o de haber soltado la frikada del año, el caso es que luego me trajo exactamente lo que pedí, el yogur que antes caduque… siempre y cuando no esté caducado ya 🙂

Foto: stopnlook (Flickr) CC-by a 21/08/2013

También podría interesarte....

There are 3 comments left Ir a comentario

  1. irene jane /
    Usando Google Chrome Google Chrome 107.0.0.0 en Mac OS X Mac OS X 10.15.7

    Thank you very much for the useful information. It has been challenging for me to come up with numerous questions about this subject. I’ll be right behind you!
    hurdle

  2. Mauricio /
    Usando Google Chrome Google Chrome 111.0.0.0 en Windows Windows NT

    SELECT f.*
    FROM Frigorifico AS f,
    (SELECT MIN(Caducidad) FROM Frigorifico WHERE Tipo=’Yogur’ AND Caducidad>=NOW()) AS v
    WHERE Tipo=’Yogur’ AND Caducidad = v.Caducidad;
    ;

  3. Billie /
    Usando Google Chrome Google Chrome 111.0.0.0 en Windows Windows NT

    Users of Magento 2 have access to CMS Static Block, which is helpful for displaying text, images, videos, and other content on the website. Widgets in the static sections can also be used to insert dynamic content. You can easily modify and create those contents by street fighter duel using the static blocks in the Magento 2 CMS. This tutorial is for you if you have already made the block and want to display it from the phtml file.

Leave a Reply