Skip to content

Commit

Permalink
Fix ExampleSelectBuilder_FromSelect output
Browse files Browse the repository at this point in the history
  • Loading branch information
lann committed May 9, 2020
1 parent 3c944b9 commit ddedf15
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions select_test.go
Expand Up @@ -309,12 +309,7 @@ func ExampleSelectBuilder_FromSelect() {
sql, _, _ := query.ToSql()
fmt.Println(sql)

// Output: SELECT company.id, company.name, users_by_company.n_users
// FROM (
// SELECT company, count(*) as n_users
// FROM users GROUP BY company
// ) AS users_by_company
// JOIN company on company.id = users_by_company.company
// Output: SELECT company.id, company.name, users_by_company.n_users FROM (SELECT company, count(*) as n_users FROM users GROUP BY company) AS users_by_company JOIN company on company.id = users_by_company.company
}

func ExampleSelectBuilder_Columns() {
Expand Down

0 comments on commit ddedf15

Please sign in to comment.