s(
> with_expression(
> Entry.daily_calorie_sum_less_than_expected,
>
> query_calorie_sum_less_than_expected.c.daily_calorie_sum_less_than_expected,
> )
> )
> .outerjoin(
> query_calorie_sum_less_than_expected,
> Entry.user_id
s_than_expected'"
On Sunday, July 10, 2022 at 10:20:12 AM UTC-6 Montana Burr wrote:
> Thank you, Mike, and apologies for not providing a stack trace or MCVE of
> my own - I assumed the code I did provide was sufficient.
>
> So, take your program and add
>
> for
username="u1",
> entries=[Entry()],
> daily_expected_calories=[
> DailyExpectedCalories(
> date=datetime.date.today(), expected_Calories=2000
> )
>
Or, is the query right? And if so, how do I get the
"daily_calorie_sum_less_than_expected" column?
On Saturday, July 9, 2022 at 2:12:35 PM UTC-6 Montana Burr wrote:
> Hi folks!
>
> I have a rather complicated SQL query to perform. I kind of know how I
> would do it
Hi folks!
I have a rather complicated SQL query to perform. I kind of know how I
would do it in SQL and am looking to port it to SQLAlchemy.
I have these ORM classes:
class User(Base):
__tablename__ = "Users"
id = Column(Integer, primary_key=True)
username = Column(String)
I have a Parent and a Child class with a many-to-many relationship between
the two. Both classes are populated with data from an external API. When
pulling info on the Child from the API, the API will also give me the
identifiers of the Parents, some of whom may not be in the database, but
the