Is there a way to total counts done in subqueries?
Select expression aliases can't be referenced at the same level. You
have to create another outer level ...
SELECT
note_id, last_updated_datetime,event_date,subject,summary,content,
linked_issues_count,linked_people_count,
Peter Brawley wrote:
Is there a way to total counts done in subqueries?
Select expression aliases can't be referenced at the same level. You
have to create another outer level ...
alternatively use variables:
mysql select @first := 1 as value1, @second := 2 as value2,
@fir...@second as
Thanks Nigel and Peter, I went for Nigel's solution below. Both very
useful, learnt a lot, thank you.
Cheers,
Nigel
nigel wood wrote:
Is there a way to total counts done in subqueries?
Never done this but my educated guess is:
SELECT
`Notes`.`note_id`,
`Notes`.`last_updated_datetime`,