Hi,
I'm storing all URLs of websites visited in a week in a table and I'm struggling to write a query that would output the different domain names of the URLs stored in the table.
My purpose in doing so is to group together all URLs belonging to the same website. Below is an example.
Record 1:
http://www.somesites.com/agdfs
Record 2:
http://www.somesites.com/ghstff
Although the URLs are different, the main website is the same (
Untitled Document) for many records which is what I'm interested in so that I can group all the records that would have
Untitled Document as main site together.
I've written a substring query using the locate function but unfortunately, the locate function will only work if I provide it with an already defined domain name, but my problem is that from the thousands of records that I have, I can't manually write all domain names. By the way, the good thing that the query that I wrote does, is that it removes the remaining characters after the last foreslash, in the example above that would be displaying
Untitled Document.
Please help me.
Thanks