Prompt Library / falak-analytics
Arabic Question to SQL
by Yousef Mansour · Falak Analytics · v1.9
PublicOpenAnalyticsStatistics
★ 4.5 5.2K runsUpdated 2026-07-11
Prompt template
2 variablesحوّل السؤال التحليلي التالي المكتوب بالعربية إلى استعلام SQL صحيح. السؤال: {arabic_question} Database schema (PostgreSQL): {table_schema} Rules: use only tables and columns present in the schema; always include a LIMIT clause on exploratory queries; return the SQL in a code block followed by a one-sentence Arabic explanation of what the query computes. If the question cannot be answered from the schema, say so instead of guessing column names.
{arabic_question}{table_schema}
Playground
Simulated sandboxExample input & output
Example input
- {arabic_question}
- ما هي أعلى خمس بلديات من حيث عدد رخص البناء الصادرة في الربع الثاني من ٢٠٢٦؟
- {table_schema}
- building_permits(permit_no text, municipality text, permit_type text, issue_date date, estimated_value_qar numeric, status text)
Example output
```sql SELECT municipality, COUNT(*) AS permits_issued FROM building_permits WHERE status = 'Issued' AND issue_date >= DATE '2026-04-01' AND issue_date < DATE '2026-07-01' GROUP BY municipality ORDER BY permits_issued DESC LIMIT 5; ``` يحسب هذا الاستعلام عدد رخص البناء الصادرة لكل بلدية خلال الربع الثاني من عام ٢٠٢٦ ويعرض أعلى خمس بلديات ترتيباً تنازلياً.
Publishing entity
faFalak Analytics
- Author
- Yousef Mansour
- Version
- v1.9
- Rating
- ★ 4.5
- Runs
- 5.2K
- License
- Open
- Updated
- 2026-07-11
Powered by
fanar-gov-7b-instruct →This template is tuned for the sovereign model above. Forked copies keep the same target model binding until republished.
Community · 0 threads
Questions, findings and requests from the entities that use this asset. Owners reply here; threads with upvotes surface to the owning entity's inbox.
No threads yet. Be the first entity to ask, or to share what you found.