| |

VerySource

 Forgot password?
 Register
Search
Author: opengl_lqf

The problem of sql statement, everyone helps to see.

[Copy link]

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-23 12:00:02
| Show all posts
select title, defaultpicurl, count (*) as c from PE_article where articleid> = 122580 and articleid <= 123583 and deleted <>-2 group by title having count (*)> 1 order by title, defaultpicurl
Reply

Use magic Report

0

Threads

43

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-1-23 23:00:02
| Show all posts
No way, do not use aggregation, or not in group by, or do not use

The landlord wants to know that it can't be achieved
If there are 3 records with the same title but different defaultpicurls, one record will eventually be created by group. Which value of defaultpicurl should be taken for this record?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list