Failed to use query with mysql in and union

SELECT * FROM bg_qa where id in (select id from bg_qa where tenant_id=3 and package_id in (0) and status = 1 and category_id in (1574)
union select belong from bg_qa where tenant_id=3 and package_id in (0) and status = 1 and category_id in (1574))
the above statement failed to query

but there is no problem with querying words and sentences separately:
select id from bg_qa where tenant_id=3 and package_id in (0) and status = 1 and category_id in (1574)
union select belong from bg_qa where tenant_id=3 and package_id in (0) and status = 1 and category_id in (1574)

)

SELECT * FROM bg_qa where id in (123, 321)

the following sentence can be queried. Can you explain why
SELECT * FROM bg_qa where id in (select id from (select id from bg_qa where tenant_id=3 and package_id in (0) and status = 1 and category_id in (1574)
union select belong from bg_qa where tenant_id=3 and package_id in (0) and status = 1 and category_id in (1574)) as abc)

)?
Mar.02,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39703-2c188.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39703-2c188.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?