Created
April 27, 2012 17:04
-
-
Save nlively/2510846 to your computer and use it in GitHub Desktop.
Service item retrieval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
jp.*, | |
si.description, si.service_id | |
FROM sun_sundocfilings_jurisdiction_prices jp | |
JOIN sun_sundocfilings_service_items si | |
ON jp.service_id = si.service_id | |
AND jp.item_id = si.guid | |
WHERE jurisdiction_id = 'd273a29a-60ea-e011-9f2a-485b397450b7' | |
AND NAME LIKE '%Articles%'; | |
A service has service items.
select * from sun_sundocfilings_service_items where service_id = '36a0e6b1-afd8-4fe6-88ee-a007010bb5af';
+-----+--------------------------------------+------------------------------------------+--------------+-----------+----------+----------+----------+----------+--------------------------------------+------------+
| id | guid | description | display_only | no_charge | price | quantity | required | selected | service_id | sort_order |
+-----+--------------------------------------+------------------------------------------+--------------+-----------+----------+----------+----------+----------+--------------------------------------+------------+
| 403 | e228e7ca-06d6-48bb-b2a1-9f6000a4cb95 | Articles of Formation- Certified Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 6 |
| 404 | 282d9fca-989b-4a4d-a366-9f6000a4e11e | Amendments- Certified Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 10 |
| 405 | dbd4591e-a27c-49bc-a7fd-9f6000a9d874 | Mergers/Dissolutions- Certified Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 14 |
| 406 | 8c939c48-6ad3-410f-9418-a00400940cae | Processing Service | false | false | 35.00000 | 1 | true | true | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 1 |
| 407 | b26ccd2d-61a2-449c-85df-a005008731df | Processing Service Rush | false | false | 99.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 2 |
| 408 | 5c91596d-df94-4317-9e68-9f6000ad6d01 | Statement of Information- Plain | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 15 |
| 409 | 4866e980-f6e8-4ba4-beed-9f6000a5ee31 | Statement of Information- Certified | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 17 |
| 410 | 6484a2ee-25aa-4ce4-be71-a0050087c244 | Statement of Information- Plain Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 16 |
| 411 | 66d48c32-1ad5-4e66-8e35-a0050087d0f8 | Statement of Information- Certified Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 18 |
| 412 | 12906d06-8a00-4755-8939-a0050087e05b | All Documents on File- Plain | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 19 |
| 413 | aca12177-3815-4a61-9680-a0050087ed3a | All Documents on File- Certified Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 22 |
| 414 | 318dc007-ba89-4331-82ad-a01400f6b23f | Any Other Doc on File- Plain | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 23 |
| 415 | ae1b08fd-1a50-4ec0-8624-a01400f72133 | Any Other Doc on File- Plain Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 24 |
| 416 | 4f86f362-91ee-4c94-9ee3-a01400f739b4 | Any Other Doc on File- Certified | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 25 |
| 417 | 42c3731e-cad9-4321-a844-a01400f7949f | Any Other Doc on File- Certified Rush | false | false | 0.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 26 |
| 418 | b6909288-5f30-407f-bf56-9f6000b33ddd | Federal Express- Priority | false | false | 25.00000 | 1 | false | false | 36a0e6b1-afd8-4fe6-88ee-a007010bb5af | 27 |
+-----+--------------------------------------+------------------------------------------+--------------+-----------+----------+----------+----------+----------+--------------------------------------+------------+
select * from sun_sundocfilings_jurisdiction_prices where service_id = '36a0e6b1-afd8-4fe6-88ee-a007010bb5af';
select * from sun_sundocfilings_jurisdiction_prices where service_id = '36a0e6b1-afd8-4fe6-88ee-a007010bb5af' and item_id = 'e228e7ca-06d6-48bb-b2a1-9f6000a4cb95'
mysql> select * from sun_sundocfilings_jurisdiction_prices where service_id = '36a0e6b1-afd8-4fe6-88ee-a007010bb5af' and item_id = 'e228e7ca-06d6-48bb-b2a1-9f6000a4cb95';
Empty set (0.00 sec)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it should be:
FROM sun_sundocfilings_jurisdiction_prices jp
JOIN sun_sundocfilings_service_items si
ON jp.service_id = si.service_id
AND jp.item_id = si.guid