SQL techniques to understand in the diagram 図で理解するSQL テクニック

# introduction
If I was asked "what is your favorite program?", I would say I like SQL

Not like Java nor C++, how to handle data is different.
At beginning, I could not get the data as I expected and it was hard to understand
to see or manipulate data ・・・（￣ー￣?）

However, SQL is good much to me, and it is fun!!

While reading the DBMS reference book 
and the SQL articles, sample code that were published on the net
I found a book called 『SQL Puzzle』

It is written by Joe Celko ・・・, It is very interesting(^_-)-☆

Each SQL cords are not so long but they are deep. Σ(ﾟﾛﾟ;)
I mean they are packed with various techniques.

If we are going to aggregate『●●●』data, the final answer will be the same,
but its approach to get the data is different.

In this book, many engineers posted their answers to each puzzle, then Joe Celko add comments
to their answers or sometimes fixed their answers to much SQL idea.

This book is good teaching materials to learn 
how to handle the data in the databese through quizzes ・・・ personally

These quizzes are not easy for people who just start to learn SQL ・・・
I try to explain in an easy-to-understand using images.

I would like to post articles in Japanese and English to be watched as much as possible.

# はじめに
個人的に好きなプログラムは？と問われると SQL と言うと思います

データの扱い方が C や Java とは違う・・・ちょっと特殊な言語です
初めはとっつきにくく、理解しづらい言語でしたが・・・（￣ー￣?）

SQLは自分に合っている言語でした。それに、面白い！！
参考書を読み、ネットで公開されているSQLの記事やサンプルコードを読んでいくうちに
『SQLパズル』という参考書に出会いました。

ジョーセルコさん著作、ミックさん訳の本なのですが実に面白い(^_-)-☆

1つ1つのクイズは SQL のコードもそれほど長くありませんが・・・奥が深い。Σ(ﾟﾛﾟ;)
色んなテクニックが詰まっている様に感じます

『〇〇〇なデータ』を集計しようとしても、最終的な答えは同じにはなりますが
そこにたどり着くアプローチは人によって違います

この参考著は、１つ1つのクイズに対して複数の技術屋さん達が自分なりの回答を出し
それらの回答に対して、ジョーセルコさんが解説を入れる・・・
または、一部手直しをしてまとめられた参考書です

データベースにあるデータをどのように扱う事ができるか？のテクニックを
クイズを通して練習できるいい教材だと・・・個人的に思っています

これからSQLを勉強する方にはちょっとハードルが高いクイズにはなりますが
そんなクイズを、画像を使って分かりやすく解説したいと思います(o_ _)ｏ))

出来るだけ多くの人に見ていただきたいので、日本語と英語で記事を書かせていただきます


# SQL
https://qiita.com/hidesroom/items/5d095a5bf883c369ae33

https://qiita.com/hidesroom/items/b17680a439648309cc3f

https://qiita.com/hidesroom/items/6c69061e2ac07ce2a8e3

https://qiita.com/hidesroom/items/bff2b95be90d9db682ff

https://qiita.com/hidesroom/items/4deea66a3e9fb0de1449

https://qiita.com/hidesroom/items/e5844f09c35545a74472

https://qiita.com/hidesroom/items/c1298b12c4c630746889

https://qiita.com/hidesroom/items/b0d6f9ca448d95d6f907

https://qiita.com/hidesroom/items/644c31ef210d1414cf1c

https://qiita.com/hidesroom/items/ca411ed97b78634c26d3

https://qiita.com/hidesroom/items/c63e25bb81f874c41bc7

https://qiita.com/hidesroom/items/0b89f5b807dfbc922267

https://qiita.com/hidesroom/items/ae881cbae930d7451f23

https://qiita.com/hidesroom/items/8cf7997a3f363c03cee4

https://qiita.com/hidesroom/items/7f5c10a9a09ef0049c3f

https://qiita.com/hidesroom/items/b652a4250e89c6b60f86

https://qiita.com/hidesroom/items/9d17e7680c53caf17278

https://qiita.com/hidesroom/items/c8033d077350d9f8a3ff

https://qiita.com/hidesroom/items/da7c8daadb938ea2066d

https://qiita.com/hidesroom/items/486a62ac2d279b8191da

https://qiita.com/hidesroom/items/06280fd6c64f46d73fec

https://qiita.com/hidesroom/items/f867631d551a0769c71f

https://qiita.com/hidesroom/items/2bf6efb182806ddaa6b7

https://qiita.com/hidesroom/items/2a7eb6db80352f91a188

https://qiita.com/hidesroom/items/9cefa5420bb4547035fa

https://qiita.com/hidesroom/items/ad4fd4a2045ad4052c90

https://qiita.com/hidesroom/items/5c3ebbba414742003749

https://qiita.com/hidesroom/items/0472b4c72effc321cffc




https://qiita.com/hidesroom/items/f83110faeb8e95b76ac3

https://qiita.com/hidesroom/items/306cacb2f0888b4207b6

https://qiita.com/hidesroom/items/d175f96e322b9e0144cb

https://qiita.com/hidesroom/items/543a0a641c2465999285

https://qiita.com/hidesroom/items/5f4620324e52be41cc84

https://qiita.com/hidesroom/items/cf850d552d60b2ca4091

https://qiita.com/hidesroom/items/312e8c6ac5808b235bd6

https://qiita.com/hidesroom/items/1f41e6689f8a237ab0d8

https://qiita.com/hidesroom/items/58a57aed79223f315185

https://qiita.com/hidesroom/items/6218f8045b427fd29855

https://qiita.com/hidesroom/items/c5cb3aa58896f9b405d6

https://qiita.com/hidesroom/items/dd8fc240e08d4cedbc99

https://qiita.com/hidesroom/items/31c3fdc32fe9902c4757

https://qiita.com/hidesroom/items/ede9052975e7dbdb1840

https://qiita.com/hidesroom/items/ff1b948ea3b98ed471b8

https://qiita.com/hidesroom/items/570d890913ab45aafb51

https://qiita.com/hidesroom/items/011969faa5b693591b43

https://qiita.com/hidesroom/items/3aa33c4b51f6fc67d7b3

https://qiita.com/hidesroom/items/62374c29232ab1b15ca3

https://qiita.com/hidesroom/items/a9f8602c9c137fa96826

https://qiita.com/hidesroom/items/84df7629fda7124c9e56

https://qiita.com/hidesroom/items/a6fdcf939c54d99b2417

https://qiita.com/hidesroom/items/dccb69e9468cbffbbe76

https://qiita.com/hidesroom/items/7882b5e7b32d397bff2a

https://qiita.com/hidesroom/items/04c8d38caf0e8f11098f

https://qiita.com/hidesroom/items/d93ad8789fb818027474

https://qiita.com/hidesroom/items/23b1e5e4acab0ca31c07

https://qiita.com/hidesroom/items/fc24cd5b1799e6f3d7aa

https://qiita.com/hidesroom/items/a87b7d296e8def40b0d9

https://qiita.com/hidesroom/items/de01259d2a866c0dbc21

https://qiita.com/hidesroom/items/fd62c95848ceaf14a638

https://qiita.com/hidesroom/items/5896175e56a9897f557f


# 参考文献 | References
[SQLパズル 第2版~プログラミングが変わる書き方/考え方 | Joe Celko, ミック](https://www.shoeisha.co.jp/book/detail/9784798114132)

[Joe Celko's SQL Puzzles and Answers](https://www.amazon.com/Puzzles-Answers-Kaufmann-Management-Systems/dp/0123735963)