diff options
Diffstat (limited to 'src/site/examples.mkd')
-rw-r--r-- | src/site/examples.mkd | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/site/examples.mkd b/src/site/examples.mkd index 21dd773..300d929 100644 --- a/src/site/examples.mkd +++ b/src/site/examples.mkd @@ -10,7 +10,11 @@ List<Product> allProducts = db.from(p).select(); // select * from customers where region='WA'
Customer c = new Customer();
-List<Customer> waCustomers = db.from(c). where(c.region).is("WA").select();
+List<Customer> waCustomers = db.from(c).where(c.region).is("WA").select();
+
+// select distinct customerId from customers where region='WA'
+Customer c = new Customer();
+List<String> customerIds = db.from(c).where(c.region).is("WA").selectDistinct(c.customerId);
public static class ProductPrice {
public String productName;
|