A
A
Ancure2017-12-04 14:20:42
SQL
Ancure, 2017-12-04 14:20:42

How to count the number of identical values ​​and divide the field values ​​by this number?

Good day to all. Tell me please.
for example, there is a table table1
Number Amount
1 156 1
2 256 7
3 256 7
I need to find out how many rows with the same values, and display the Amount divided by the number of these values.
Help me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-12-04
@klim76

groupby + avg() +count()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question