How to fetch 2 tables in one query?

Hi, I would like to fetch table: WiewiorkaMixedRubbish and WiewiorkaSegregatedRubbish but it shows me error: cannot redeclare block-scoped variable 'data' ```js export const getStaticProps: GetStaticProps = async () => { const supabaseAdmin = createClient( process.env.NEXT_PUBLIC_SUPABASE_URL || "", process.env.SUPABASE_SERVICE_ROLE_KEY || "" ); const { data } = await supabaseAdmin .from("WiewiorkaMixedRubbish") .select("*") .order("id"); return { props: { mixedRubbish: data, }, }; // second table i wanted to query at the first supabaseAdmin query. I want return it as another prop called segregatedRubbish const { data } = await supabaseAdmin .from("WiewiorkaSegregatedRubbish") .select("*") .order("id"); return { props: { segregatedRubbish: data, }, }; }; ``` how can i Combite 1 data query with another table called WiewiorkaSegregatedRubbish` ?
Was this page helpful?