-
-
Notifications
You must be signed in to change notification settings - Fork 18
Update _dml-40.adoc #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update _dml-40.adoc #167
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,17 @@ The feature is defined in (SQL:2011): 7.6 <table reference> (Feature T491). | |
.Examples | ||
[source] | ||
---- | ||
/* select customers with they last order date and number */ | ||
select c.name, ox.order_date as last_order, ox.number | ||
from customer c | ||
left join LATERAL | ||
( | ||
select first 1 o.order_date, o.number | ||
from orders o | ||
where o.id_customer=o.id | ||
order by o.ORDER_DATE desc | ||
) as ox | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The join is missing an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, yes please fix it ON 1=1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used |
||
---- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Replace with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not find markup definition yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
select dt.population, dt.city_name, c.country_name | ||
from (select distinct country_name from cities) AS c, | ||
LATERAL (select first 1 city_name, population | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not c.id instead of o.id?
where o.id_customer = c.id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I had overlooked that. Fix is underway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in df16def, thanks for reporting.