README.md

This commit is contained in:
Gwendal Roué committed 2015-09-11 13:29:03 +02:00
1 parent 8173b31df9
commit 162bdff3ee
1 file changed
+2 -2
+2 -2
View File
@@ -802,9 +802,9 @@ Yet, it does a few things well:
```swift
let persons = Person.fetchAll(db,
"SELECT persons.*, COUNT(*) AS citizenshipsCount " +
"SELECT persons.*, COUNT(citizenships.isoCode) AS citizenshipsCount " +
"FROM persons " +
"JOIN citizenships ON citizenships.personId = persons.id " +
"LEFT JOIN citizenships ON citizenships.personId = persons.id " +
"GROUP BY persons.id")
let person = persons.first!
(person.name, person.citizenshipsCount)