Prompt-Bibliothek

Datenanalyse-Prompts

Prompts für die Arbeit mit Daten: SQL aus einem Schema schreiben, einen Datensatz auf Qualitätsprobleme prüfen und ein Ergebnis erklären.

Die Prompts sind auf Englisch, der Sprache, in der sie geschrieben und getestet wurden. Beschreibungen und Hinweise auf diesen Seiten sind übersetzt.

  • sql
  • queries
  • analytics
100/100 · 158 Tokens

SQL-Abfrage aus einem Schema

Schreibt eine SQL-Abfrage zu einer Frage und verwendet nur die Tabellen und Spalten des von Ihnen gelieferten Schemas.

Einsetzen, wenn: Sie wissen, was Sie die Daten fragen wollen, aber nicht, welche Joins nötig sind.

prompt
You are a senior data analyst writing SQL.

## Task
Write one SQL query that answers the question below, using the schema provided.

## Requirements
- Use only tables and columns that appear in the schema.
- Use explicit JOIN syntax and qualify every column with its table alias.
- Never use SELECT *.
- State the SQL dialect the query is written for.
- Write "the schema cannot answer this" and name the missing column when the question needs data the schema lacks.

## Output format
Return one SQL code block, followed by a numbered list explaining each join and filter, and a bulleted list of assumptions.

## Input
<question>
{{question}}
</question>

<schema>
{{schema}}
</schema>

<dialect>
{{dialect}}
</dialect>

Variablen

{{question}}
Die zu beantwortende Frage.
{{schema}}
Die CREATE-TABLE-Anweisungen oder eine Liste von Tabellen mit Spalten und Typen.
{{dialect}}
Die Datenbank, zum Beispiel PostgreSQL oder BigQuery.

Beispieleingabe

question: monthly revenue per country for 2025
schema: orders(id, customer_id, total, created_at); customers(id, country)
dialect: PostgreSQL

Beispielausgabe

```sql
SELECT c.country, date_trunc('month', o.created_at) AS month, SUM(o.total) AS revenue
FROM orders AS o
JOIN customers AS c ON c.id = o.customer_id
WHERE o.created_at >= '2025-01-01' AND o.created_at < '2026-01-01'
GROUP BY c.country, month;
```

Beispielhaft: geschrieben, um die erwartete Form zu zeigen, nicht von einem Modell erzeugt.

  • data quality
  • cleaning
  • profiling
100/100 · 148 Tokens

Qualitätsprüfung eines Datensatzes

Prüft eine Datenstichprobe auf fehlende Werte, uneinheitliche Formate, Duplikate und Ausreißer.

Einsetzen, wenn: Vor einer Analyse oder einem Trainingslauf, wenn Sie wissen müssen, was zuerst bereinigt werden soll.

prompt
You are a senior data analyst profiling a dataset.

## Task
Review the data sample below and report its quality problems.

## Requirements
- Check each column for missing values, mixed formats, duplicates, and values outside a plausible range.
- Cite the row for every problem you report.
- Report only problems visible in the sample; never estimate rates for the full dataset.
- Recommend one cleaning step per problem.
- State which checks need the full dataset to confirm.

## Output format
Return a markdown table with the columns Column, Problem, Example row, and Cleaning step, followed by a bulleted list titled Needs the full dataset.

## Input
<sample>
{{sample}}
</sample>

<description>
{{description}}
</description>

Variablen

{{sample}}
Die Kopfzeile und mindestens 20 Zeilen des Datensatzes.
{{description}}
Was jede Spalte enthalten soll.

Beispieleingabe

sample: rows with dates as both 2025-01-03 and 03/01/2025, and one age of 212.
description: signup_date is a date; age is in years.

Beispielausgabe

| Column | Problem | Example row | Cleaning step |
|---|---|---|---|
| signup_date | Two date formats | Row 7: 03/01/2025 | Parse both formats and store ISO 8601 |
| age | Implausible value | Row 12: 212 | Set to null and flag for review |

Beispielhaft: geschrieben, um die erwartete Form zu zeigen, nicht von einem Modell erzeugt.

Machen Sie ihn zu Ihrem

Passen Sie die Anforderungen an Ihre Standards an und prüfen Sie dann das Ergebnis. Der Prompt-Analyzer bewertet neu, während Sie tippen, der Optimierer entfernt Füllwörter, ohne eine Anforderung zu verlieren, und der Sicherheitsscanner markiert Geheimnisse und personenbezogene Daten, bevor Sie den Prompt an ein Modell senden.

Weitere Kategorien