Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
join1_databaser [2016-10-28 13:07] Joakim Forsgren |
join1_databaser [2017-09-01 14:54] 127.0.0.1 external edit |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Databaser + enkla JOIN ====== | ====== Databaser + enkla JOIN ====== | ||
Gå igenom '' | Gå igenom '' | ||
- | < | + | < |
- | select join_users.*, | + | # ex från genomgång |
+ | select join_users.*, | ||
+ | from join_users | ||
+ | left join join_items | ||
+ | on join_users.user_id=join_items.user_id | ||
+ | where join_users.user_id > 25 | ||
+ | group by join_users.user_id | ||
+ | having antal=0 | ||
+ | order by antal desc; | ||
</ | </ | ||