Kalau cuma boleh jago satu rumus Google Sheets, pilih QUERY. Dia bisa filter, urutkan, kelompokin, dan jumlahin data cuma dengan satu rumus — mirip bahasa database. Di artikel ini kita bedah QUERY dari dasar sampai bisa langsung dipakai.
If you could only master one Google Sheets formula, pick QUERY. It can filter, sort, group, and sum data with a single formula — like a database language. In this article we break QUERY down from the basics to ready-to-use.
Rumus biasa kaya SUMIFS cuma ngasih satu angka. QUERY ngasih kamu tabel hasil — bisa milih kolom, nyaring baris, dan ngurutin sekaligus.Ordinary formulas like SUMIFS give you one number. QUERY gives you a whole result table — picking columns, filtering rows, and sorting all at once.
Artinya satu QUERY bisa ganti kerjaan filter manual, pivot table, dan sortir yang biasanya makan waktu. Begitu data berubah, hasilnya ikut update sendiri.That means one QUERY can replace manual filtering, pivot tables, and sorting that usually eat time. When the data changes, the result updates itself.
Bentuknya: =QUERY(data; "perintah"). “data” itu rentang selnya, dan “perintah” ditulis mirip kalimat Inggris sederhana. Satu rumus, hasilnya tabel.The form is: =QUERY(data, "command"). “data” is the cell range, and the “command” is written like a simple English sentence. One formula, a table result.
Tentuin kolom mana yang mau ditampilin, misal SELECT A, C, E. Nggak perlu semua kolom ikut — ambil yang kamu butuh aja biar hasilnya bersih.Decide which columns to show, e.g. SELECT A, C, E. You don’t need every column — take only what you need for a clean result.
Ini jantung filternya. WHERE B = 'Selesai' cuma nampilin baris yang statusnya Selesai. Bisa digabung pakai AND/OR buat syarat lebih dari satu.This is the filtering heart. WHERE B = 'Done' shows only rows with status Done. Combine with AND/OR for more than one condition.
Buat ngerekap, misal total penjualan per produk: SELECT A, SUM(C) GROUP BY A. Ini yang ngegantiin pivot table — hasilnya langsung terkelompok dan terjumlah.For recaps, e.g. total sales per product: SELECT A, SUM(C) GROUP BY A. This replaces the pivot table — the result is grouped and summed instantly.
ORDER BY ngurutin hasil (misal dari omzet terbesar), dan LABEL ngeganti nama judul kolom biar enak dibaca. Dua ini bikin hasil QUERY siap langsung dipajang.ORDER BY sorts the result (e.g. highest revenue first), and LABEL renames the column headers so they read well. These two make the QUERY result ready to display.
Tips: Tulis perintah QUERY-nya huruf kecil semua dan rapihin spasinya. Kalau error, 90% penyebabnya salah ketik nama kolom atau kurang tanda petik.Tip: Write the QUERY command in lowercase and keep the spacing tidy. If it errors, 90% of the time it’s a mistyped column letter or a missing quote.
Beberapa hal bikin QUERY makin relevan:A few things make QUERY more relevant than ever:
AI bantu nulis QUERY. Sekarang kamu bisa minta AI bikinin rumus QUERY dari deskripsi biasa — tapi tetep perlu ngerti strukturnya buat mastiin bener.AI helps write QUERY. You can now ask AI to build a QUERY from a plain description — but you still need to understand the structure to verify it.
Data makin numpuk. Makin banyak transaksi, makin kerasa bedanya rekap manual vs satu QUERY yang update sendiri.Data keeps piling up. The more transactions, the bigger the gap between manual recaps and a single self-updating QUERY.
Dipakai di balik aplikasi. Banyak web app berbasis Sheets pakai QUERY di belakang layar buat narik data — jadi skill ini makin kepake.Used behind apps. Many Sheets-based web apps use QUERY behind the scenes to pull data — so this skill is increasingly useful.
Rangkuman perintah yang paling sering dipakai:A summary of the most-used clauses:
| PerintahClause | FungsiFunction | ContohExample |
|---|---|---|
| SELECTSELECT | Pilih kolomChoose columns | SELECT A, CSELECT A, C |
| WHEREWHERE | Saring barisFilter rows | WHERE B = 'Selesai'WHERE B = 'Done' |
| GROUP BYGROUP BY | Rekap/grupRecap/group | SUM(C) GROUP BY ASUM(C) GROUP BY A |
| ORDER BYORDER BY | UrutkanSort | ORDER BY C DESCORDER BY C DESC |
| LABELLABEL | Ganti judulRename header | LABEL SUM(C) 'Total'LABEL SUM(C) 'Total' |
QUERY kelihatan rumit di awal, tapi begitu kebiasa, dia jadi rumus yang paling sering kamu buka. Coba mulai dari SELECT + WHERE, sisanya nyusul sendiri.QUERY looks intimidating at first, but once you get used to it, it becomes the formula you reach for most. Start with SELECT + WHERE, and the rest will follow.
Rakitdata punya puluhan template Google Sheets siap pakai — rumus, dashboard, dan rekapnya udah jalan dari awal.Rakitdata has dozens of ready-to-use Google Sheets templates — formulas, dashboards, and recaps already running from the start.