sqlobject.tests.test_views module — SQLObject 3.9.1 documentation

# sqlobject.tests.test_views module

class `sqlobject.tests.test_views.` `PhoneCall`(**kw)

  Bases: `sqlobject.main.SQLObject`

  `j` = phone_call
  property `minutes`
  property `phoneNumber`
  property `phoneNumberID`
  `q` = phone_call
  class `sqlmeta`(instance)

    Bases: `sqlobject.main.sqlmeta`

    `childName` = None
    `idName` = 'id'
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_views.PhoneCall`

    `style` = <sqlobject.styles.MixedCaseUnderscoreStyle object>
    `table` = 'phone_call'
  property `to`
  property `toID`

class `sqlobject.tests.test_views.` `PhoneNumber`(**kw)

  Bases: `sqlobject.main.SQLObject`

  property `calls`
  property `incoming`
  `j` = phone_number
  property `number`
  `q` = phone_number
  class `sqlmeta`(instance)

    Bases: `sqlobject.main.sqlmeta`

    `childName` = None
    `idName` = 'id'
    `indexes` = []
    `joinDefinitions` = [<sqlobject.joins.SQLMultipleJoin object>, <sqlobject.joins.SQLMultipleJoin object>]
    `joins` = [<sqlobject.joins.SOSQLMultipleJoin object>, <sqlobject.joins.SOSQLMultipleJoin object>]
    `soClass`

      alias of `sqlobject.tests.test_views.PhoneNumber`

    `style` = <sqlobject.styles.MixedCaseUnderscoreStyle object>
    `table` = 'phone_number'

class `sqlobject.tests.test_views.` `ViewPhone`(**kw)

  Bases: `sqlobject.views.ViewSQLObject`

  property `calls`
  `j` = view_phone
  property `minutes`
  property `number`
  property `numberOfCalls`
  property `phoneNumber`
  property `phoneNumberID`
  `q` = (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone
  class `sqlmeta`(instance)

    Bases: `sqlobject.declarative.sqlmeta`

    `alias` = 'view_phone'
    `childName` = None
    `clause` = ((phone_call.phone_number_id) = (phone_number.id))
    `idName` = phone_number.id
    `indexes` = []
    `joinDefinitions` = [<sqlobject.joins.SQLMultipleJoin object>, <sqlobject.joins.SQLMultipleJoin object>]
    `joins` = [<sqlobject.joins.SOSQLMultipleJoin object>, <sqlobject.joins.SOSQLMultipleJoin object>]
    `soClass`

      alias of `sqlobject.tests.test_views.ViewPhone`

    `table` = (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone
  property `vCalls`

class `sqlobject.tests.test_views.` `ViewPhoneCall`(**kw)

  Bases: `sqlobject.views.ViewSQLObject`

  property `call`
  property `callID`
  `j` = view_phone_call
  property `minutes`
  property `number`
  property `phoneNumber`
  property `phoneNumberID`
  `q` = (SELECT view_phone_call_base.id AS id, view_phone_call_base.minutes AS minutes, view_phone_call_base.number AS number, view_phone_call_base.phoneNumberID AS phoneNumberID, view_phone_call_base.callID AS callID FROM (SELECT DISTINCT phone_call.id AS id, phone_call.minutes AS minutes, phone_number.number AS number, phone_number.id AS phoneNumberID, phone_call.id AS callID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_call_base LEFT JOIN (SELECT phone_call.id AS view_phone_call_0_id FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_call.id) view_phone_call_0 ON view_phone_call_base.id = view_phone_call_0.view_phone_call_0_id) view_phone_call
  class `sqlmeta`(instance)

    Bases: `sqlobject.declarative.sqlmeta`

    `alias` = 'view_phone_call'
    `childName` = None
    `clause` = ((phone_call.phone_number_id) = (phone_number.id))
    `idName` = phone_call.id
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_views.ViewPhoneCall`

    `table` = (SELECT view_phone_call_base.id AS id, view_phone_call_base.minutes AS minutes, view_phone_call_base.number AS number, view_phone_call_base.phoneNumberID AS phoneNumberID, view_phone_call_base.callID AS callID FROM (SELECT DISTINCT phone_call.id AS id, phone_call.minutes AS minutes, phone_number.number AS number, phone_number.id AS phoneNumberID, phone_call.id AS callID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_call_base LEFT JOIN (SELECT phone_call.id AS view_phone_call_0_id FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_call.id) view_phone_call_0 ON view_phone_call_base.id = view_phone_call_0.view_phone_call_0_id) view_phone_call

class `sqlobject.tests.test_views.` `ViewPhoneInnerAggregate`(**kw)

  Bases: `sqlobject.tests.test_views.ViewPhone`

  `j` = view_phone_inner_aggregate
  `q` = (SELECT view_phone_inner_aggregate_base.id AS id, view_phone_inner_aggregate_base.number AS number, view_phone_inner_aggregate_base.phoneNumberID AS phoneNumberID, view_phone_inner_aggregate_0.minutes AS minutes, view_phone_inner_aggregate_0.numberOfCalls AS numberOfCalls, view_phone_inner_aggregate_0.twiceMinutes AS twiceMinutes FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_inner_aggregate_base LEFT JOIN (SELECT phone_number.id AS view_phone_inner_aggregate_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls, ((SUM(phone_call.minutes)) * (2)) AS twiceMinutes FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_inner_aggregate_0 ON view_phone_inner_aggregate_base.id = view_phone_inner_aggregate_0.view_phone_inner_aggregate_0_id) view_phone_inner_aggregate
  class `sqlmeta`(instance)

    Bases: `sqlobject.declarative.sqlmeta`

    `alias` = 'view_phone_inner_aggregate'
    `childName` = None
    `indexes` = []
    `joinDefinitions` = [<sqlobject.joins.SQLMultipleJoin object>, <sqlobject.joins.SQLMultipleJoin object>]
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_views.ViewPhoneInnerAggregate`

    `table` = (SELECT view_phone_inner_aggregate_base.id AS id, view_phone_inner_aggregate_base.number AS number, view_phone_inner_aggregate_base.phoneNumberID AS phoneNumberID, view_phone_inner_aggregate_0.minutes AS minutes, view_phone_inner_aggregate_0.numberOfCalls AS numberOfCalls, view_phone_inner_aggregate_0.twiceMinutes AS twiceMinutes FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_inner_aggregate_base LEFT JOIN (SELECT phone_number.id AS view_phone_inner_aggregate_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls, ((SUM(phone_call.minutes)) * (2)) AS twiceMinutes FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_inner_aggregate_0 ON view_phone_inner_aggregate_base.id = view_phone_inner_aggregate_0.view_phone_inner_aggregate_0_id) view_phone_inner_aggregate
  property `twiceMinutes`

class `sqlobject.tests.test_views.` `ViewPhoneMore`(**kw)

  Bases: `sqlobject.views.ViewSQLObject`

  View on top of view

  `j` = view_phone_more
  property `minutesCalled`
  property `number`
  `q` = (SELECT view_phone_more_base.id AS id, view_phone_more_base.number AS number, view_phone_more_0.timesCalled AS timesCalled, view_phone_more_0.minutesCalled AS minutesCalled, view_phone_more_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) view_phone_more_base LEFT JOIN (SELECT view_phone.id AS view_phone_more_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) view_phone_more_0 ON view_phone_more_base.id = view_phone_more_0.view_phone_more_0_id LEFT JOIN (SELECT view_phone.id AS view_phone_more_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) view_phone_more_1 ON view_phone_more_0.view_phone_more_0_id = view_phone_more_1.view_phone_more_1_id) view_phone_more
  class `sqlmeta`(instance)

    Bases: `sqlobject.declarative.sqlmeta`

    `alias` = 'view_phone_more'
    `childName` = None
    `clause` = ((view_phone.id) = (phone_call.to_id))
    `idName` = view_phone.id
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_views.ViewPhoneMore`

    `table` = (SELECT view_phone_more_base.id AS id, view_phone_more_base.number AS number, view_phone_more_0.timesCalled AS timesCalled, view_phone_more_0.minutesCalled AS minutesCalled, view_phone_more_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) view_phone_more_base LEFT JOIN (SELECT view_phone.id AS view_phone_more_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) view_phone_more_0 ON view_phone_more_base.id = view_phone_more_0.view_phone_more_0_id LEFT JOIN (SELECT view_phone.id AS view_phone_more_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) view_phone_more_1 ON view_phone_more_0.view_phone_more_0_id = view_phone_more_1.view_phone_more_1_id) view_phone_more
  property `timesCalled`
  property `timesCalledLong`

class `sqlobject.tests.test_views.` `ViewPhoneMore2`(**kw)

  Bases: `sqlobject.tests.test_views.ViewPhoneMore`

  `j` = vpm
  `q` = (SELECT vpm_base.id AS id, vpm_base.number AS number, vpm_0.timesCalled AS timesCalled, vpm_0.minutesCalled AS minutesCalled, vpm_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) vpm_base LEFT JOIN (SELECT view_phone.id AS vpm_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) vpm_0 ON vpm_base.id = vpm_0.vpm_0_id LEFT JOIN (SELECT view_phone.id AS vpm_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) vpm_1 ON vpm_0.vpm_0_id = vpm_1.vpm_1_id) vpm
  class `sqlmeta`(instance)

    Bases: `sqlobject.declarative.sqlmeta`

    `alias` = 'vpm'
    `childName` = None
    `indexes` = []
    `joinDefinitions` = []
    `joins` = []
    `soClass`

      alias of `sqlobject.tests.test_views.ViewPhoneMore2`

    `table` = (SELECT vpm_base.id AS id, vpm_base.number AS number, vpm_0.timesCalled AS timesCalled, vpm_0.minutesCalled AS minutesCalled, vpm_1.timesCalledLong AS timesCalledLong FROM (SELECT DISTINCT view_phone.id AS id, view_phone.number AS number FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id))) vpm_base LEFT JOIN (SELECT view_phone.id AS vpm_0_id, COUNT(phone_call.to_id) AS timesCalled, SUM(phone_call.minutes) AS minutesCalled FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE ((view_phone.id) = (phone_call.to_id)) GROUP BY view_phone.id) vpm_0 ON vpm_base.id = vpm_0.vpm_0_id LEFT JOIN (SELECT view_phone.id AS vpm_1_id, COUNT(phone_call.to_id) AS timesCalledLong FROM (SELECT view_phone_base.id AS id, view_phone_base.number AS number, view_phone_base.phoneNumberID AS phoneNumberID, view_phone_0.minutes AS minutes, view_phone_0.numberOfCalls AS numberOfCalls FROM (SELECT DISTINCT phone_number.id AS id, phone_number.number AS number, phone_number.id AS phoneNumberID FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id))) view_phone_base LEFT JOIN (SELECT phone_number.id AS view_phone_0_id, SUM(phone_call.minutes) AS minutes, COUNT(phone_call.phone_number_id) AS numberOfCalls FROM phone_call, phone_number WHERE ((phone_call.phone_number_id) = (phone_number.id)) GROUP BY phone_number.id) view_phone_0 ON view_phone_base.id = view_phone_0.view_phone_0_id) view_phone, phone_call WHERE (((view_phone.id) = (phone_call.to_id)) AND ((phone_call.minutes) > (10))) GROUP BY view_phone.id) vpm_1 ON vpm_0.vpm_0_id = vpm_1.vpm_1_id) vpm

`sqlobject.tests.test_views.` `checkAttr`(cls, id, attr, value)

`sqlobject.tests.test_views.` `setup_module`(mod)

`sqlobject.tests.test_views.` `testAliasOverride`()

`sqlobject.tests.test_views.` `testColumnSQLVPC`()

`sqlobject.tests.test_views.` `testDistinctCount`()

`sqlobject.tests.test_views.` `testGetVP`()

`sqlobject.tests.test_views.` `testGetVPC`()

`sqlobject.tests.test_views.` `testGetVPM`()

`sqlobject.tests.test_views.` `testInnerAggregate`()

`sqlobject.tests.test_views.` `testJoinView`()

`sqlobject.tests.test_views.` `testSelect`()

`sqlobject.tests.test_views.` `testSelect2`()

`sqlobject.tests.test_views.` `testSimpleVPC`()