support group_concat aggregation

Open
#780 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
sqlite, swift
Domain
databases

Research direction

The issue provides a target SQL query using GROUP_CONCAT but names no files, tests, or entry points. Start by locating the query and aggregate-function APIs, then inspect related tests. Done should mean the SQL aggregation is expressible through Swift and covered by a test matching the requested grouped labels.

Written by the indexing model from the issue text.

Description

enhancement

I have two tables Cards and CardLabels, I want to select all cards and labels associated to it.

The SQL query will be like this:
SELECT card.*, GROUP_CONCAT(label.title , ',') AS labels FROM Cards card JOIN CardLabels label ON card.number = label.number GROUP BY card.number

I wonder how to do GROUP_CONCAT and write this query with Swift.

Dominant language
Swift
Stars
10.2k
Forks
1.6k
Avg merge
6d 2h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stephencelis/SQLite.swift

All issues in stephencelis/SQLite.swift

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.