*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- SELECT t1.fio
- (SELECT *
- (SELECT DISTINCT FM +" "+ IM +" "+OT AS fio
- FROM tab1
- WHERE dep="Отделение профилактики безнадзорности и семейного неблагополучия"
- AND amount IS NOT NULL) AS t1
- LEFT JOIN
- (SELECT DISTINCT fio
- FROM tab3
- WHERE vid="2") AS t2
- ON t2.fio = t1.fio) AS tk
- WHERE tk.t2.fio IS NOT NULL;
You can edit this paste and save as new: