Skip to content

Chapter 7 - A small correction in sql code in group query #65

@shanmugavel04

Description

@shanmugavel04

Please find the below correction in the book under the Grouping section
In the book:
--in SQL
%sql
SELECT
count()
FROM
dfTable
GROUP BY
InvoiceNo, CustomerId
+---------+----------+-----+
|InvoiceNo|CustomerId|count|
+---------+----------+-----+
| 536846| 14573| 76|
| 537026| 12395| 12|
| 537883| 14437| 5|
...
| 543188| 12567| 63|
| 543590| 17377| 19|
| C543757| 13115| 1|
| C544318| 12989| 1|
+---------+----------+-----+
correct one:
--in SQL
Select InvoiceNo, CustomerId, count(
)
from dfTable
Group by InvoiceNo, CustomerId

could you please modify the source accordingly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions