jump to:allmastodonblueskylemmylobstersdevstackwikirsshn
wwebbit
view: | | |

Knowledge / Stack Overflow · hot matching “sqlalchemy”

2 shown · updated 29m ago · read only
  1. AVG() over a JOINed orders/order_items table gives the wrong "average order value" — correct SQLAlchemy aggregation pattern? (stackoverflow.com)stack

    27 points by Adarsh Singh in stackoverflow.com · 1h ago · stack

    I have a fairly standard e-commerce schema: one orders row per order, and one order_items row per line item on that order (an order has 1-N items): sql CREATE TABLE orders ( id INTEGER PRIMARY KEY, order_date DATE ); CREATE TABLE order_items ( id INTEGER PRIMARY KEY, order_id IN…
    filed under sqlalchemy
  2. How to create an AND expression with SqlAlchemy ORM select? (stackoverflow.com)stack

    22 points by Helping1908 in stackoverflow.com · 2h ago · stack

    I have a SQL Alchemy ORM model called Customer class Customer(BaseModel): __tablename__ = "customer" id: Mapped[str] = mapped_column(String(64), default=str_uuid, primary_key=True) name: Mapped[str] = mapped_column(String(128)) email: Mapped[str] = mapped_column(String(64)) dele…
    filed under pythonsqlalchemy