I think distinct-result is helpful here:
https://stackoverflow.com/q/60051384/262852
as is count. How would I pipe the result from the set of distinct-result to a count? If the count >1 then I could delete that tweet.
Just thinking out-loud. Is that reasonable? Or, might I not be re-inventing the wheel here?
On 2020-02-03 10:41 p.m., thufir wrote:
Not sure of the correct lingo, but I'm building a database of tweets. As I run it, duplicate tweets are added to the database. I can see the duplicates with:
for $tweets in db:open("twitter") return <tweet>{$tweets/json/id__str}</tweet>
Firstly, how would I select the json node for a duplicate entity. But, before even selecting that node, recursively look to see if there's more than one result for that id__str value.
How would I even generate a count of each occurrence for the data of a specific id__str?
thanks,
Thufir