Hugging Face model: TheBloke/sqlcoder-7B-GGUF
Author: TheBloke
Created: 2023-11-15 21:53:49
Last modified: 2023-11-15 21:58:18
Pipeline: text-generation
Library: transformers
Likes: 18 | Downloads: 508
Tags: transformers, gguf, mistral, code, text-generation, en, base_model:defog/sqlcoder-7b, base_model:quantized:defog/sqlcoder-7b, license:cc-by-sa-4.0, region:us
Base model relation: quantized
Base models: id: defog/sqlcoder-7b
Card metadata:
base_model: defog/sqlcoder-7b
inference: no
language: en
license: cc-by-sa-4.0
model_creator: Defog.ai
model_name: SQLCoder 7B
model_type: mistral
pipeline_tag: text-generation
prompt_template: ## Task
Generate a SQL query to answer the following question:
`{prompt}`

### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE products (
  product_id INTEGER PRIMARY KEY, -- Unique ID for each product
  name VARCHAR(50), -- Name of the product
  price DECIMAL(10,2), -- Price of each unit of the product
  quantity INTEGER  -- Current quantity in stock
);

CREATE TABLE sales (
  sale_id INTEGER PRIMARY KEY, -- Unique ID for each sale
  product_id INTEGER, -- ID of product sold
  customer_id INTEGER,  -- ID of customer who made purchase
  salesperson_id INTEGER, -- ID of salesperson who made the sale
  sale_date DATE, -- Date the sale occurred
  quantity INTEGER -- Quantity of product sold
);

-- sales.product_id can be joined with products.product_id

### SQL
Given the database schema, here is the SQL query that answers `{prompt}`:
```sql

quantized_by: TheBloke
tags: code