Here's how to apply two query statements with the same structure if I want to outer join query A to query B.
It would be helpful if you could point it out with a specific code.
select wd.id, ... ... from sss.dd inner join ddd.lll on aa.id = ddd.id left join xxx.lll on xxx.user = bbb.user ... ... group by wd.id, ..., ..., ...
select wd.id, ... ... from aaa.bb inner join ddd.lll on aa.id = ddd.id left join xxx.lll on xxx.user = bbb.user ... ... group by wd.id, ..., ..., ...
Answer # 1
Same as a table if it is simply enclosed in () and treated as a set.
select * from (select ~) as query A left join (select ~) as query B on Query A.ID = Query B.ID
However, if you look at the contents, it refers to the same table in two queries, so
I think that it is more efficient to disassemble and re-assemble.
- php - when reading a text column with select with mysql, characters are cut off in the middle
- Will the index be used in MySQL query conditions?
- Mysql slow query optimization method and optimization principles
- Simple example of MySQL join table query
- Simple understanding of MySQL SELECT execution order
- Basic concepts and optimization of MySQL query statement procedure and EXPLAIN statement
- Detailed mysql statement query user permissions process
- Two query methods when mysql query field type is json
- Mysql solve database N + 1 query problem
- Mysql self-connection query instance
- Mysql query is slow and stuck in sending data
- Optimization Analysis of Limit Query in Mysql Optimization Techniques
- Common causes and solutions of MySQL slow SQL statements
- MySql comma spliced string query two methods
- How to make mysql in docker automatically execute sql statements when starting
- Reasons and solutions for slow mysql query
- Reasons and solutions for slow MySQL query performance and poor performance
- Use tp framework and SQL statements to query a field in a data table containing a value
- MySQL multi-table joint query operation example analysis
- Mysql slow query optimization from theory and practice shows the advantages of limit
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved