Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql->select()
- ->columns(array('GroupedColum'
- ,'minValue' => new Expression('min(ValueColumn)')))
- ->from('ValueTable')
- ->group('GroupedColum')
- ->order('minValue')
- ->order('GroupedColum')
- ->limit(10);
- $predicate = new ZendDbSqlPredicatePredicate();
- $sql->where($predicate->greaterThan('filterColumn','20);
- select GroupedColum
- , min(ValueColumn) as minValue
- from ValueTable
- where filterColumn > 20
- group by GroupedColum
- order by minValue
- GroupedColum
- limit 10;
- $predicate = new ZendDbSqlPredicatePredicate();
- $predicate = new ZendDbSqlWhere();
- $sql->select()
- ->columns(array('GroupedColum'
- ,'minValue' => new Expression('min(ValueColumn)')))
- ->from('ValueTable')
- ->group('GroupedColum')
- ->order('minValue')
- ->order('GroupedColum')
- ->limit(10);
- $predicate = new ZendDbSqlWhere();
- $sql->where($predicate->greaterThan('filterColumn','20);
Add Comment
Please, Sign In to add comment