Giter Site home page Giter Site logo

learn-sql-in-a-month-of-lunches's Introduction

Learn SQL in a Month of Lunches

These are the supporting resources for the book "Learn SQL in a Month of Lunches" (Manning Publications)

IMPORTANT: If you installed the sqlnovel database prior to January 1, 2023, please download and execute an updated version of the Create_SQLNovel_database.sql script from the Chapter_01 folder. If you don't do this, some of the scripts from Chapter 7 onward may not work or produce the same results in the book.

learn-sql-in-a-month-of-lunches's People

Contributors

desertdba avatar

Stargazers

 avatar DavidPham avatar Alexandros Giavaras avatar  avatar Mark Engle avatar Bassam Mejlaoui (The CyberPolyglot) avatar Aurélien Plazzotta avatar Chris Thomas avatar Sebastian avatar Ayo Bee avatar Arthur Henrique Pereira Chagas avatar Lee Stetson avatar Herminio Torres avatar Douglas Galindo avatar Florian Wilhelm avatar Losang Jinpa, PhD, MCSE/MCT, Cloud Monk avatar eunsang_lee avatar  avatar Enrique Pizana avatar Peter Schott avatar earle avatar  avatar Mike Shepard avatar

Watchers

earle avatar  avatar  avatar

learn-sql-in-a-month-of-lunches's Issues

No icon to start MySQL Workbench

After installation, there is no obvious way to start MySQL Workbench. One example of how to do this was added to the Markdown instructions and included as Pull Request #2

A suggestion for SQL example in chapter 12.2.1

Hello, I am now reading this book in version 15.
When I get to chapter 12.2.1, the SQL example doesn't make sense to me.

SELECT OrderID, SUM(Quantity * ItemPrice) as OrderTotal
FROM OrderItem 
GROUP BY OrderID
ORDER BY OrderID;

As the OrderID is unique in the OrderItem table, this result can simply be done without aggregating, as shown following:

SELECT OrderID, (Quantity * ItemPrice) as OrderTotal
FROM OrderItem
ORDER BY OrderID;

This example seems confusing for the purpose of using SUM and GROUP BY. I have come up with an example that seems more meaningful:

SELECT t.TitleName, SUM(oi.Quantity * oi.ItemPrice) as TotalPrice
FROM OrderItem as oi
INNER JOIN Title t
    ON oi.TitleID = t.TitleID
GROUP BY t.TitleName
ORDER BY t.TitleName;

This example shows the TotalPrice of each TitleName that has been ordered currently. Although this SQL is a little more complex than the example in the book, it seems more reasonable.

The table names in the sample SQL in the book does not match the provided database.

Hello, I am reading this book in version 15.

I love this book since you describe the logic and concept of SQL very clearly and easy to understand.
However, almost all the sample codes provided in this book write the table name in entirely lower-case, which is actually in upper camel case in the SQL provided in this repository.

This could be confusing for a brand-new SQL starter, as the SQL sample cannot be executed if the reader copy the code directly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.