Data::Model::SQL->new(
    where => +[
        foo => [ -and => 'foo', 'bar', 'baz'],
        bar => 'baz',
        baz => +{ '!=' => 2 },
    ],
    order => [
        +{ foo => 'ASC' },
    ],
    joins => [
        foo => [
            { inner => { 'baz b1' => 'foo.baz_id = b1.baz_id AND b1.quux_id = 1' }}
        ],
    ],
    group => [qw/ foo bar /],
);