だから私はこれは本当に醜い(しかし機能的な)複数のサブクエリmysqlSelectコマンドを持っています。
select myt_taxon_list, count(myt_taxon_list)
from (select t1.taxon_list as myt_taxon_list, t1.query_prot_id,
count(t1.query_prot_id) / (select count(t.id)
from taxa t, stax st
where t.systematics like concat('%; ', st.taxon_list, '%')
and t.taxon_name not like '%thaliana%'
and st.taxon_list = t1.taxon_list
group by t1.taxon_list) as taxfrac
from task1 t1
where t1.taxon_list = 'Stramenopiles'
group by t1.query_prot_id) myt
where taxfrac > 0.5
最後の行で「Stramenopiles」を読むことができます。この結果は単純なカウントです。ここで、ストラメノパイルだけでなく、その列のすべてのエントリのカウントを、合計としてではなく、分離されたすべてのエントリのカウントを書き込むbashスクリプトを作成します。これをbashの反復ループと組み合わせる必要がありますが、これまでスクリプトを作成したことはありません。誰かがこれを手伝ってくれますか?