Skip to content
Advertisement

Tag: mysql

Aggregated row count differences between tables

I have two MySQL tables A and B both with this schema ID entity_id asset asset_type 0 12345 x 1 .. ……… ….. ………. I would like to get an aggregated top 10/50/whatever entity_ids with the largest row count difference between the two tables. I think I could do this manually by just getting the highest row count by entity_id

How to print a variable in SQL stored procedure?

I want to print the a variable in the above code. But the code returns How to fix this? Answer You can use an OUT variable ✓ ✓ | answer | | :—– | | yes | db<>fiddle here* Or simply don_’t use INTO or := | count(amount) | | ————: | | 2 | ✓ | answer | |

Advertisement