<prompt> Tuseme una meza inayoitwa shughuli na nguzo shughuli_id , mteja_id , shughuli_ tarehe , na kiasi. Andika SQL query kupata mteja na jumla ya matumizi ya juu katika miezi 6 iliyopita, isipokuwa wateja wowote ambao si kufanyika shughuli yoyote katika miezi 6 iliyopita.  <response>: Here is an example SQL query that should achieve the desired outcome:SELECT customer_id, SUMamount as total_spendFROM transactionsWHERE transaction_date DATEADDmonth, -6, GETDATE -- Get transactions from the last 6 monthsGROUP BY customer_idHAVING COUNTDISTINCT DATEDIFFmonth, 0, transaction_date 6 -- Exclude customers who have not made transactions in the last 6 monthsORDER BY total_spend DESCLIMIT 1; This query uses the SUM function to calculate each customers total spend, and groups the results by customer ID. It then filters out any customers who havent made any transactions in the last 6 months using the HAVING clause. Finally, the results are sorted by total spend in descending order, and the LIMIT 1 clause returns only the customer with the highest spend. 