Skip to content

min(), max(), avg() inference #309

Closed

Description

@staabm

min(), max(), avg() and unsigned columns or types we know the integer range of

Activity

  1. added
    enhancement
    on Feb 20, 2022
  2. changed the title [-]`min()`, `max()` inference[/-] [+]`min()`, `max()`, `avg()` inference[/+] on Feb 20, 2022
  3. staabm commented on Sep 25, 2022

    @staabm
    OwnerAuthor

    already covered in

    public function aggregateFunctions(PDO $pdo)
    {
    $query = 'SELECT MAX(adaid), MIN(adaid), COUNT(adaid), AVG(adaid) FROM ada WHERE adaid = 1';
    $stmt = $pdo->query($query, PDO::FETCH_ASSOC);
    assertType('PDOStatement<array{MAX(adaid): int<-32768, 32767>|null, MIN(adaid): int<-32768, 32767>|null, COUNT(adaid): int, AVG(adaid): numeric-string|null}>', $stmt);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions