<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kemuex</author_name>
  <author_url>https://blog.hatena.ne.jp/kemuex/</author_url>
  <blog_title>けむブログ</blog_title>
  <blog_url>https://kemuex.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>実行順番 FROM → WHERE → GROUPBY → HAVING → SELECT → ORDERBY つまり GroupByでグルーピングする前に抽出するのがWhere句 GroupByでグルーピングした後に抽出するのがHaving句 具体例 「グレーパーカー」より売上額が高い商品の「名前」「商品の値段」「売上額」を取得する場合 テーブルは2種類で sales_records, items, NG select items.name, items.price, items.price * count(*) as &quot;売上額&quot; from sales_records left join i…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkemuex.hatenablog.com%2Fentry%2F2018%2F01%2F28%2F200118&quot; title=&quot;where句とhaving句の実行順番の違い - けむブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-01-28 20:01:18</published>
  <title>where句とhaving句の実行順番の違い</title>
  <type>rich</type>
  <url>https://kemuex.hatenablog.com/entry/2018/01/28/200118</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
