Skip to content

.ai counting is always incorrect #43

@joaquincasares

Description

@joaquincasares

This prompt always provides this query:

>   .ai count attendees by country

SELECT country, COUNT(*) FROM conferences.super_awesome ALLOW FILTERING;


┌─────────┬───────┐                                                                                                                                                      
│ country │ count │                                                                                                                                                      
├─────────┼───────┤                                                                                                                                                      
│ Brazil  │ 2     │                                                                                                                                                      
└─────────┴───────┘

However, a SELECT * shows:

┌──────────────────────────────────────┬─────────┬──────────────────────┬───────────────────┬─────────────┬──────────────────────┬───────────────────────┬─────────────┐ 
│ attendee_id                          │ country │ dietary_restrictions │ email             │ full_name   │ registration_date    │ session_interests     │ ticket_type │ 
├──────────────────────────────────────┼─────────┼──────────────────────┼───────────────────┼─────────────┼──────────────────────┼───────────────────────┼─────────────┤ 
│ bf1830f0-b399-4875-911a-635bd275daea │ Brazil  │ [vegetarian]         │ maria@example.com │ Maria Silva │ 2025-09-15T00:00:00Z │ [AI, Cloud]           │ VIP         │ 
│ a4b94d02-4a4f-47fb-a58f-5defa00c0525 │ Japan   │ []                   │ yuki@example.jp   │ Yuki Tanaka │ 2025-09-20T00:00:00Z │ [Databases, Security] │ Standard    │ 
└──────────────────────────────────────┴─────────┴──────────────────────┴───────────────────┴─────────────┴──────────────────────┴───────────────────────┴─────────────┘ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions