Explore BrainMass

Explore BrainMass

    Query Questions and Results

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Q4: Write a query to produce the result using the table website.

    Q4.a For URLs which start with HTTPS, return URL_NAME up to 1st slash
    Q4.b Count number of records for each location, but report location as 'home' and 'work' instead of 0 and 1
    Q4.c Change '%3d' to equal sign (=)

    TABLE websites
    User ID Location URL_NAME
    1 0 http://bulletins.myspace.com/index.cfm?fuseaction=bulletin.confirmation&mode=5&groupID=0&userID=196539
    1 0 http://media.fimnetwork.com/st?ad_type=ad&ad_size=430x600§ion=217131&hvs=BBJRFUOOP&bvs=3
    1 0 http://home.myspace.com/index.cfm?fuseaction=user&MyToken=97cf2349-68ba-443c-82a9-f3eb44f3a248
    2 1 https://www.nationalcity.com/personal/Default.asp
    2 1 https://onlinebanking.nationalcity.com/OLB/secure/AccountList.aspx
    2 1 https://onlinebanking.nationalcity.com/OLB/secure/AccountActivity.aspx?AE=hsV89cadT8uhnTuou1HJFg%3d

    © BrainMass Inc. brainmass.com October 10, 2019, 3:13 am ad1c9bdddf


    Solution Preview

    I give the query in the attachment.

    SELECT t1.domain_id, ...

    Solution Summary

    The expert writes a query to product the result using a table. The number of records for each location are provided.