55 | | select username, firstname, lastname, locationname from users u |
56 | | join workers w on w.userid=u.userid |
57 | | left join locations l on l.locationid=w.locationid |
58 | | where u.userid=4 |
| 55 | select a.articlename, s.quantity, l.locationname, a.description from articles a |
| 56 | left join storedarticles s on s.articleid=a.articleid |
| 57 | left join locations l on l.locationid=s.locationid |
| 58 | where a.articleid=3 |
| 59 | }}} |
| 60 | {{{#!sql |
| 61 | select c.categoryname from categories c |
| 62 | left join article_belongs_to_category abtc on abtc.categoryid=c.categoryid |
| 63 | left join articles a on a.articleid=abtc.articleid |
| 64 | where a.articleid=3 |