Ret the Folf on Nostr: What can you do about this? Well, not much really. Frustratingly a lot of the ...
What can you do about this? Well, not much really. Frustratingly a lot of the documentation is focussed on avoiding this error and not getting the result you probably want.
In MySQL (the only correct DBMS

), one can use the ANY_VALUE() function to wrap those nonaggregated, non-functionally-dependent columns and say *"yeah, I know they'll be random, don't worry about it uwu"

*.
You could make the nonaggregated, non-grouped-by columns UNIQUE or PRIMARY KEYs, but that isn't practical in most cases (like here, where the table contains multiple records with the same person).
Rewriting your query in a way that selects full rows based on the aggregated subquery might be the approach to take (that's what I did today).
Published at
2025-04-16 21:25:25Event JSON
{
"id": "21daf072e8a3e192f501d46f0331b2d13a148fafec26f645265c15fe40d25f58",
"pubkey": "8eb60b129600eb232d9cfdd4d01f28efd5579d715a6230ac0fedde46f13049a2",
"created_at": 1744838725,
"kind": 1,
"tags": [
[
"e",
"f45a0e4455b704d9101924eecac619f5497477d1dc8486cffd5a0eea9e5ad786",
"wss://relay.mostr.pub",
"reply"
],
[
"emoji",
"blobfoxsmirk",
"https://furry.engineer/system/custom_emojis/images/000/015/115/original/da31ebe9dc5f0c4d.png"
],
[
"emoji",
"blobfox",
"https://furry.engineer/system/custom_emojis/images/000/014/850/original/7cc8897451c6365f.png"
],
[
"proxy",
"https://furry.engineer/users/ret/statuses/114349750715573452",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content": "What can you do about this? Well, not much really. Frustratingly a lot of the documentation is focussed on avoiding this error and not getting the result you probably want.\n\nIn MySQL (the only correct DBMS :blobfoxsmirk: ), one can use the ANY_VALUE() function to wrap those nonaggregated, non-functionally-dependent columns and say *\"yeah, I know they'll be random, don't worry about it uwu\" :blobfox: *.\n\nYou could make the nonaggregated, non-grouped-by columns UNIQUE or PRIMARY KEYs, but that isn't practical in most cases (like here, where the table contains multiple records with the same person).\n\nRewriting your query in a way that selects full rows based on the aggregated subquery might be the approach to take (that's what I did today).",
"sig": "6afe8ecbaee06174d6079f302b0f1471a40327d10346338d9e1cd389f341bb8e36cd7cfa634ac7c397ae97f70acd3d3eaaa96c286552f59df3ae55749086a430"
}