Select from query
Used `from_` keyword.

``` python
    subq = (HistRec
            .select(fn.unnest(fn.string_to_array(HistRec.medserv, ' ')).alias('ms'))
            .where(HistRec.state == 1)
            .alias('subq'))

    qs = (HistRec
            .select(subq.c.ms, fn.count(subq.c.ms))
            .from_(subq)
            .group_by(subq.c.ms)
            .order_by(subq.c.ms))
```

@coleifer thanks for perfect ORM!
 Glad you got it sorted out!

Hi!
Cannot understand how to select from query?

``` sql
select ms, count(ms) from
    (select unnest(string_to_array(medserv,' ')) as ms
        from hist h
        where h.state = 1
    ) as a
group by ms
order by ms
```
