黄舟2017-04-17 15:17:17
How do you do a joint query when your four tables are not related?
-》Recently I am doing a cross-table query of database tables divided by month. gem 'active_record_union'
This will be suitable for you and help you encapsulate the union
巴扎黑2017-04-17 15:17:17
If the amount of data is not large, you can refer to the union mentioned above. If the amount of data is large, it is recommended to query in pieces and then merge them in the program...