Well... sorry I can't find the issue from my code and output.

---output--------------

11:25:02,197 INFO  [iyeiye.lib.search.wringout]
-------------------------------------------------------------------------------------------------------------------------------------

11:25:02,220 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._begin_impl] BEGIN

11:25:02,224 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT count(1) AS count_1

FROM rooms INNER JOIN (SELECT anon_2.property_id AS property_id, min
(anon_2.house_rent) AS minprice

FROM (SELECT rooms.id AS id, rooms.name AS name, rooms.space_utilized
AS space_utilized, rooms.floor AS floor, rooms.direction AS direction,
rooms.reference_url AS reference_url, rooms.remarks AS remarks,
rooms.private_remarks AS private_remarks, rooms.is_recommand AS
is_recommand, rooms.advertisement AS advertisement,
rooms.has_parking_space AS has_parking_space,
rooms.immediately_moveable AS immediately_moveable, rooms.arrangement
AS arrangement, rooms.arrangement_detail AS arrangement_detail,
rooms.house_rent AS house_rent, rooms.security_deposit AS
security_deposit, rooms.key_money AS key_money, rooms.right_money AS
right_money, rooms.management_fee AS management_fee,
rooms.communal_charge AS communal_charge, rooms.parking_charge AS
parking_charge, rooms.property_id AS property_id, rooms.company_id AS
company_id, rooms.created AS created, rooms.modified AS modified

FROM rooms) AS anon_2 GROUP BY anon_2.property_id) AS anon_1 ON
rooms.property_id = anon_1.property_id AND rooms.house_rent =
anon_1.minprice GROUP BY rooms.property_id

11:25:02,224 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] []

11:25:02,224 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('count_1',)

11:25:02,225 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (1L,)

11:25:02,229 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT rooms.id AS rooms_id, rooms.name AS
rooms_name, rooms.space_utilized AS rooms_space_utilized, rooms.floor
AS rooms_floor, rooms.direction AS rooms_direction,
rooms.reference_url AS rooms_reference_url, rooms.remarks AS
rooms_remarks, rooms.private_remarks AS rooms_private_remarks,
rooms.is_recommand AS rooms_is_recommand, rooms.advertisement AS
rooms_advertisement, rooms.has_parking_space AS
rooms_has_parking_space, rooms.immediately_moveable AS
rooms_immediately_moveable, rooms.arrangement AS rooms_arrangement,
rooms.arrangement_detail AS rooms_arrangement_detail, rooms.house_rent
AS rooms_house_rent, rooms.security_deposit AS rooms_security_deposit,
rooms.key_money AS rooms_key_money, rooms.right_money AS
rooms_right_money, rooms.management_fee AS rooms_management_fee,
rooms.communal_charge AS rooms_communal_charge, rooms.parking_charge
AS rooms_parking_charge, rooms.property_id AS rooms_property_id,
rooms.company_id AS rooms_company_id, rooms.created AS rooms_created,
rooms.modified AS rooms_modified

FROM rooms INNER JOIN (SELECT anon_2.property_id AS property_id, min
(anon_2.house_rent) AS minprice

FROM (SELECT rooms.id AS id, rooms.name AS name, rooms.space_utilized
AS space_utilized, rooms.floor AS floor, rooms.direction AS direction,
rooms.reference_url AS reference_url, rooms.remarks AS remarks,
rooms.private_remarks AS private_remarks, rooms.is_recommand AS
is_recommand, rooms.advertisement AS advertisement,
rooms.has_parking_space AS has_parking_space,
rooms.immediately_moveable AS immediately_moveable, rooms.arrangement
AS arrangement, rooms.arrangement_detail AS arrangement_detail,
rooms.house_rent AS house_rent, rooms.security_deposit AS
security_deposit, rooms.key_money AS key_money, rooms.right_money AS
right_money, rooms.management_fee AS management_fee,
rooms.communal_charge AS communal_charge, rooms.parking_charge AS
parking_charge, rooms.property_id AS property_id, rooms.company_id AS
company_id, rooms.created AS created, rooms.modified AS modified

FROM rooms) AS anon_2 GROUP BY anon_2.property_id) AS anon_1 ON
rooms.property_id = anon_1.property_id AND rooms.house_rent =
anon_1.minprice GROUP BY rooms.property_id

 LIMIT 0, 1

11:25:02,230 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] []

11:25:02,232 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('rooms_id', 'rooms_name',
'rooms_space_utilized', 'rooms_floor', 'rooms_direction',
'rooms_reference_url', 'rooms_remarks', 'rooms_private_remarks',
'rooms_is_recommand', 'rooms_advertisement',
'rooms_has_parking_space', 'rooms_immediately_moveable',
'rooms_arrangement', 'rooms_arrangement_detail', 'rooms_house_rent',
'rooms_security_deposit', 'rooms_key_money', 'rooms_right_money',
'rooms_management_fee', 'rooms_communal_charge',
'rooms_parking_charge', 'rooms_property_id', 'rooms_company_id',
'rooms_created', 'rooms_modified')

11:25:02,232 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (69L, '4528\xe5\x8f\xb7\xe5\xae\xa4', 2.0, 6L, 'south', 'http://
iyeiye.jp/', '\xe5\xa4\x9a\xe5\xb0\x91\xe6\xb1\x9a\xe3\x82\x8c
\xe3\x81\x82\xe3\x82\x8a', '\xe3\x83\x93\xe3\x83\xab\xe3\x81\xab
\xe3\x82\x88\xe3\x82\x8a\xe6\x97\xa5\xe5\xbd\x93\xe3\x81\x9f
\xe3\x82\x8a\xe6\x82\xaa\xe3\x81\x97', 0, '', 1, 0, '1K', '10*5',
25000L, 1.5, 1.0, None, 4000L, 500L, 14000L, 1L, 2L, datetime.datetime
(2009, 3, 17, 11, 20, 16), None)

11:25:02,240 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT count(1) AS count_1

FROM rooms INNER JOIN (SELECT anon_2.property_id AS property_id, min
(anon_2.house_rent) AS minprice

FROM (SELECT rooms.id AS id, rooms.name AS name, rooms.space_utilized
AS space_utilized, rooms.floor AS floor, rooms.direction AS direction,
rooms.reference_url AS reference_url, rooms.remarks AS remarks,
rooms.private_remarks AS private_remarks, rooms.is_recommand AS
is_recommand, rooms.advertisement AS advertisement,
rooms.has_parking_space AS has_parking_space,
rooms.immediately_moveable AS immediately_moveable, rooms.arrangement
AS arrangement, rooms.arrangement_detail AS arrangement_detail,
rooms.house_rent AS house_rent, rooms.security_deposit AS
security_deposit, rooms.key_money AS key_money, rooms.right_money AS
right_money, rooms.management_fee AS management_fee,
rooms.communal_charge AS communal_charge, rooms.parking_charge AS
parking_charge, rooms.property_id AS property_id, rooms.company_id AS
company_id, rooms.created AS created, rooms.modified AS modified

FROM rooms) AS anon_2 GROUP BY anon_2.property_id) AS anon_1 ON
rooms.property_id = anon_1.property_id AND rooms.house_rent =
anon_1.minprice GROUP BY rooms.property_id

11:25:02,243 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] []

11:25:02,243 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('count_1',)

11:25:02,243 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (1L,)

11:25:02,247 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT properties.id AS properties_id,
properties.name AS properties_name, properties.built AS
properties_built, properties.nof AS properties_nof,
properties.classification AS properties_classification,
properties.structure AS properties_structure, properties.reference_url
AS properties_reference_url, properties.remarks AS properties_remarks,
properties.private_remarks AS properties_private_remarks,
properties.prefecture AS properties_prefecture,
properties.municipality AS properties_municipality, properties.street
AS properties_street, properties.number AS properties_number,
properties.branch_id AS properties_branch_id, properties.created AS
properties_created, properties.modified AS properties_modified

FROM properties

WHERE properties.id = %s

11:25:02,247 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] [1L]

11:25:02,249 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('properties_id', 'properties_name',
'properties_built', 'properties_nof', 'properties_classification',
'properties_structure', 'properties_reference_url',
'properties_remarks', 'properties_private_remarks',
'properties_prefecture', 'properties_municipality',
'properties_street', 'properties_number', 'properties_branch_id',
'properties_created', 'properties_modified')

11:25:02,249 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (1L, 'S\xe3\x82\xbf
\xe3\x82\xa6\xe3\x83\xb3\xe3\x83\x91\xe3\x82\xb9\xe3\x83\x88\xe3\x83\xa9\xe3\x83\xab
\xe3\x83\x8f\xe3\x82\xa4\xe3\x83\xa0A\xe6\xa3\x9f-lJ', datetime.date
(1992, 8, 20), 6L, None, 'iron-frame', 'http://www.google.com/',
'\xe5\xb0\x8f\xe5\xad\xa6\xe6\xa0\xa1\xef\xbc\x9a\xe6\x9b
\x99\xe5\xb0\x8f\xe5\xad\xa6\xe6\xa0\xa1\xe3\x80\x80\xe4\xb8\xad
\xe5\xad\xa6\xe6\xa0\xa1\xef\xbc\x9a\xe4\xb8\xad
\xe5\xb3\xb6\xe4\xb8\xad\xe5\xad\xa6\xe6\xa0\xa1\n\xe9\x80\x80\xe5\x8e
\xbb\xe6\x99\x82\xe3\x83\x9a
\xe3\x83\x83\xe3\x83\x88\xe6\xb8\x85\xe6\x8e\x83\xe6\x96\x99\n
\xe5\x85\x89\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\x90\xe3\x83\xbc
\xe5\xaf\xbe\xe5\xbf\x9c\xef\xbc\x88B\xe3\x83\x95\xe3\x83\xac
\xe3\x83\x83\xe3\x83\x84\xef\xbc\x89', '\xe7\x8f\xbe\xe5\x9c
\xa8\xe4\xbb\x98\xe8\xbf\x91\xe3\x81\xa7\xe5\xb7\xa5\xe4\xba\x8b
\xe4\xb8\xad', '\xe5\x8c\x97\xe6\xb5\xb7\xe9\x81\x93', '\xe5\xb0\x8f
\xe6\xa8\xbd\xe5\xb8\x82', '\xe6\xb0\xb4\xe8\xbb\x8a
\xe7\x94\xba28\xe6\x9d\xa118\xe4\xb8\x81\xe7\x9b\xae', None, 8L,
datetime.datetime(2009, 3, 17, 11, 20, 16), None)

11:25:02,252 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT as_stations.station_id AS
as_stations_station_id, as_stations.property_id AS
as_stations_property_id, as_stations.timetaken AS
as_stations_timetaken

FROM as_stations

WHERE %s = as_stations.property_id ORDER BY as_stations.timetaken

11:25:02,252 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] [1L]

11:25:02,253 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('as_stations_station_id',
'as_stations_property_id', 'as_stations_timetaken')

11:25:02,253 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (33L, 1L, 2.0)

11:25:02,255 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT stations.name AS stations_name,
stations.base_id AS stations_base_id, stations.id AS stations_id,
stations.`order` AS stations_order, stations.stationline_id AS
stations_stationline_id

FROM stations

WHERE stations.id = %s

11:25:02,255 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] [33L]

11:25:02,255 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('stations_name', 'stations_base_id',
'stations_id', 'stations_order', 'stations_stationline_id')

11:25:02,256 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row ('\xe7\x90\xb4\xe4\xbc\xbc', None, 33L, 32L, 3L)

11:25:02,292 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT stationlines.id AS stationlines_id,
stationlines.name AS stationlines_name, stationlines.kind AS
stationlines_kind, stationlines.`order` AS stationlines_order

FROM stationlines

WHERE stationlines.id = %s

11:25:02,293 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] [3L]

11:25:02,293 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('stationlines_id', 'stationlines_name',
'stationlines_kind', 'stationlines_order')

11:25:02,293 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (3L, '\xe6\x9d\xb1\xe8\xa5\xbf\xe7\xb7\x9a', 'subway', 2L)

11:25:02,297 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] SELECT rooms.id AS rooms_id, rooms.name AS
rooms_name, rooms.space_utilized AS rooms_space_utilized, rooms.floor
AS rooms_floor, rooms.direction AS rooms_direction,
rooms.reference_url AS rooms_reference_url, rooms.remarks AS
rooms_remarks, rooms.private_remarks AS rooms_private_remarks,
rooms.is_recommand AS rooms_is_recommand, rooms.advertisement AS
rooms_advertisement, rooms.has_parking_space AS
rooms_has_parking_space, rooms.immediately_moveable AS
rooms_immediately_moveable, rooms.arrangement AS rooms_arrangement,
rooms.arrangement_detail AS rooms_arrangement_detail, rooms.house_rent
AS rooms_house_rent, rooms.security_deposit AS rooms_security_deposit,
rooms.key_money AS rooms_key_money, rooms.right_money AS
rooms_right_money, rooms.management_fee AS rooms_management_fee,
rooms.communal_charge AS rooms_communal_charge, rooms.parking_charge
AS rooms_parking_charge, rooms.property_id AS rooms_property_id,
rooms.company_id AS rooms_company_id, rooms.created AS rooms_created,
rooms.modified AS rooms_modified

FROM rooms

WHERE %s = rooms.property_id AND rooms.id != %s ORDER BY
rooms.house_rent, rooms.management_fee

11:25:02,297 INFO  [sqlalchemy.engine.base.Engine.0x...
48ec._cursor_execute] [1L, 69L]

11:25:02,299 DEBUG [sqlalchemy.engine.base.Engine.0x...
48ec._init_metadata] Col ('rooms_id', 'rooms_name',
'rooms_space_utilized', 'rooms_floor', 'rooms_direction',
'rooms_reference_url', 'rooms_remarks', 'rooms_private_remarks',
'rooms_is_recommand', 'rooms_advertisement',
'rooms_has_parking_space', 'rooms_immediately_moveable',
'rooms_arrangement', 'rooms_arrangement_detail', 'rooms_house_rent',
'rooms_security_deposit', 'rooms_key_money', 'rooms_right_money',
'rooms_management_fee', 'rooms_communal_charge',
'rooms_parking_charge', 'rooms_property_id', 'rooms_company_id',
'rooms_created', 'rooms_modified')

11:25:02,299 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (48L, '312\xe5\x8f\xb7\xe5\xae\xa4', 4.0, 11L, 'west', 'http://
www.foobar.com/', '\xe3\x83\xaa\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xbc
\xe3\x83\xa0\xe6\xb8\x88\xe3\x81\xbf', '\xe9\x9b\xa8\xe6\xbc\x8f
\xe3\x82\x8a\xe3\x81\x82\xe3\x82\x8a', 0,
'\xe3\x83\x90\xe3\x82\xb9\xe5\xbe\x92\xe6\xad\xa9\xe4\xba\x8c
\xe5\x88\x86\xef\xbc\x81\xe9\x80\x9a\xe5\x8b\xa4\xe3\x83\xbb
\xe9\x80\x9a\xe5\xad\xa6\xe3\x81\xab\xe4\xbe\xbf\xe5\x88\xa9', 1, 1,
'1K', '10*5', 35000L, None, 1.5, 1.0, 6000L, 800L, 11000L, 1L, 6L,
datetime.datetime(2009, 3, 17, 11, 20, 16), None)

11:25:02,299 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (89L, '1566\xe5\x8f\xb7\xe5\xae\xa4', 4.0, 10L, 'south', 'http://
www.foobar.com/', '\xe3\x83\xaa\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xbc
\xe3\x83\xa0\xe6\xb8\x88\xe3\x81\xbf', '', 1, '\xe5\x8c
\x97\xe5\xa4\xa7\xe5\x89\x8d\xef\xbc\x81\xe5\xad\xa6\xe7\x94\x9f
\xe5\x90\x91\xe3\x81\x91\xe3\x80\x82', 0, 0, 'over 5LDK', '\xe3\x83\xad
\xe3\x83\x95\xe3\x83\x88 10*5*2', 50000L, 0.5, None, 1.5, 9000L, 200L,
11000L, 1L, 8L, datetime.datetime(2009, 3, 17, 11, 20, 16), None)

11:25:02,299 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (88L, '2413\xe5\x8f\xb7\xe5\xae\xa4', 19.0, 5L, 'north', None, '',
'', 0, '\xe5\xb8\x82\xe5\xbd\xb9\xe6\x89\x80\xe7\x9b\xae\xe3\x81\xae
\xe5\x89\x8d\xef\xbc\x81', 0, 1, 'over 5LDK', '10*9*8', 60000L, 1.5,
1.0, 0.5, 3000L, 800L, 12000L, 1L, 6L, datetime.datetime(2009, 3, 17,
11, 20, 16), None)

11:25:02,299 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (70L, '2110\xe5\x8f\xb7\xe5\xae\xa4', 1.0, 18L, 'east-south',
'http://www.google.com/', '', '\xe9\x9b\xa8\xe6\xbc\x8f\xe3\x82\x8a
\xe3\x81\x82\xe3\x82\x8a', 1, '\xe5\xb8\x82\xe5\xbd
\xb9\xe6\x89\x80\xe7\x9b\xae\xe3\x81\xae\xe5\x89\x8d\xef\xbc\x81', 1,
1, 'over 5LDK', '4*4', 60000L, None, None, 1.0, 4000L, 400L, 10000L,
1L, 4L, datetime.datetime(2009, 3, 17, 11, 20, 16), None)

11:25:02,300 DEBUG [sqlalchemy.engine.base.Engine.0x...48ec.__init__]
Row (77L, '2063\xe5\x8f\xb7\xe5\xae\xa4', 15.0, 12L, 'west', 'http://
iyeiye.jp/', '', '\xe9\x9b\xa8\xe6\xbc\x8f\xe3\x82\x8a
\xe3\x81\x82\xe3\x82\x8a', 0, '', 1, 1, 'over 5LDK', '4*4', 60000L,
1.0, 0.5, 1.0, 9000L, 300L, None, 1L, 8L, datetime.datetime(2009, 3,
17, 11, 20, 16), None)
-------------------------------------

Having no idea :-(

On 3月17日, 午前2:45, "Michael Bayer" <[email protected]> wrote:
> the Query will consolidate multiple rows with the same primary key into a
> single object instance - comparing the rows returned by the two different
> approaches will reveal the source of the issue.  set echo='debug' to see
> that output.
>
> Alisue wrote:
>
> > SQLAlchemy: 0.5.2
> > SQLite: 3.5.9
> > MySQL: 5.0.67-0ubuntu6
>
> > To short. The problem is 'The result come differently from session's
> > query and plain sql which built by session's query.'
>
> > Well... It is too difficult to explain the situation so just have a
> > look my code first please.
>
> > subquery = query.subquery()
> > minroom = meta.Session.query(subquery.c.property_id, func.min
> > (subquery.c.house_rent).label('minprice'))
> > minroom = minroom.group_by(subquery.c.property_id)
> > minroom = minroom.subquery()
> > query = meta.Session.query(model.Room).join((minroom,
> > (model.Room.property_id==minroom.c.property_id) &
> > (model.Room.house_rent == minroom.c.minprice)))
> > query = query.group_by(model.Room.property_id) # This line break
> > everything.
> > raise str(len(query.all()))
> >>> 1 - So stupid. Should be '10'.
>
> > However. The result should be '10' because ...
>
> > subquery = query.subquery()
> > minroom = meta.Session.query(subquery.c.property_id, func.min
> > (subquery.c.house_rent).label('minprice'))
> > minroom = minroom.group_by(subquery.c.property_id)
> > minroom = minroom.subquery()
> > query = meta.Session.query(model.Room).join((minroom,
> > (model.Room.property_id==minroom.c.property_id) &
> > (model.Room.house_rent == minroom.c.minprice)))
> > query = query.group_by(model.Room.property_id) # This line break
> > everything.
> > # raise str(len(query.all()))
> > sql = str(query)
> > query = meta.Session.query(model.Room).from_statement(sql)
> > raise str(len(query.all()))
> >>> 10 - This is correct.
>
> > Or execute <sql> (written bottom of this post, built by session's
> > query) on Terminal with sqlite3/MySQL return '10' as well (when I
> > count the rows).
>
> > I'm using SQLAlchemy on Pylons 0.9.7 and the module named 'paginator'
> > doesn't allow to pass the data type of 'SQLAlchemy 0.5.2 's select
> > object (SQL Expression Table Data). That's why (and else) I need to
> > use ORM. (And I don't know that even SQL Expression could return
> > correct value or not.)
>
> > Does anyone have idea? Or is it just bug and i have to wait to be
> > fixed this?
>
> > By the way. I'm using 'declarative_base()' to build my ORM.
>
> > Thanks. and sorry for my horrible english :-(
>
> > <sql>
> > SELECT rooms.id AS rooms_id, rooms.name AS rooms_name,
> > rooms.space_utilized AS rooms_space_utilized, rooms.floor AS
> > rooms_floor, rooms.direction AS rooms_direction, rooms.reference_url
> > AS rooms_reference_url, rooms.remarks AS rooms_remarks,
> > rooms.private_remarks AS rooms_private_remarks, rooms.is_recommand AS
> > rooms_is_recommand, rooms.advertisement AS rooms_advertisement,
> > rooms.has_parking_space AS rooms_has_parking_space,
> > rooms.immediately_moveable AS rooms_immediately_moveable,
> > rooms.arrangement AS rooms_arrangement, rooms.arrangement_detail AS
> > rooms_arrangement_detail, rooms.house_rent AS rooms_house_rent,
> > rooms.security_deposit AS rooms_security_deposit, rooms.key_money AS
> > rooms_key_money, rooms.right_money AS rooms_right_money,
> > rooms.management_fee AS rooms_management_fee, rooms.communal_charge AS
> > rooms_communal_charge, rooms.parking_charge AS rooms_parking_charge,
> > rooms.property_id AS rooms_property_id, rooms.company_id AS
> > rooms_company_id, rooms.created AS rooms_created, rooms.modified AS
> > rooms_modified
> > FROM rooms JOIN (SELECT anon_2.property_id AS property_id, min
> > (anon_2.house_rent) AS minprice
> > FROM (SELECT rooms.id AS id, rooms.name AS name, rooms.space_utilized
> > AS space_utilized, rooms.floor AS floor, rooms.direction AS direction,
> > rooms.reference_url AS reference_url, rooms.remarks AS remarks,
> > rooms.private_remarks AS private_remarks, rooms.is_recommand AS
> > is_recommand, rooms.advertisement AS advertisement,
> > rooms.has_parking_space AS has_parking_space,
> > rooms.immediately_moveable AS immediately_moveable, rooms.arrangement
> > AS arrangement, rooms.arrangement_detail AS arrangement_detail,
> > rooms.house_rent AS house_rent, rooms.security_deposit AS
> > security_deposit, rooms.key_money AS key_money, rooms.right_money AS
> > right_money, rooms.management_fee AS management_fee,
> > rooms.communal_charge AS communal_charge, rooms.parking_charge AS
> > parking_charge, rooms.property_id AS property_id, rooms.company_id AS
> > company_id, rooms.created AS created, rooms.modified AS modified
> > FROM rooms) AS anon_2 GROUP BY anon_2.property_id) AS anon_1 ON
> > rooms.property_id = anon_1.property_id AND rooms.house_rent =
> > anon_1.minprice GROUP BY rooms.property_id
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to