[英]How do I get max value for a specific corresponding column when I have 3 other corresponding columns?
I have 4 columns: URL |我有 4 列: URL | keywords |关键词 | Volume (of keyword) |数量(关键字)| Position (of Keyword) Position(关键字)
is there a way I can pull the max(volume) for the URL?有没有办法可以拉出 URL 的最大(音量)? I also want to pull in keyword and position column, but I have multiple values per URL, so when I add the other columns I get back more data than I want.我还想提取关键字和 position 列,但是每个 URL 有多个值,所以当我添加其他列时,我得到的数据比我想要的多。
Not clear on the question,if you mean that you need maximum volume for a given url while retaining the other columns,here is the code: Select url,keywords,position,(select max(volume) from your_table t1 where t1.url=t.url) From your_table t Not clear on the question,if you mean that you need maximum volume for a given url while retaining the other columns,here is the code: Select url,keywords,position,(select max(volume) from your_table t1 where t1.url= t.url) 来自 your_table t
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.