D
D
Denis Ogurtsov2014-11-19 19:26:09
MySQL
Denis Ogurtsov, 2014-11-19 19:26:09

How to find the changed value in a column?

There is a table

id  cost  max_cpc  convertion
7    1$        1              10
6    5$        1              11
5    6$        1              14
4    2$        2              15
3    7$        3              15
2    8$        1              1
1    1$        1               10

How to find the last change of the max_cpc field (in this example it is the line with id=4) and use it to sum up the fields: cost and conversion in one query or with a subquery?
I don’t want to select everything and look for the last change in the cycle and then make a new request ......

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
whats, 2014-11-19
@whats

You will not find this last change in any cycle here. I think there will not be a single person who would have guessed that this is a line with id 4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question