I want to create a simple search engine that can count the number of properties that match on a user. I am using a field in JSON format that lists the properties, and when the user enters a search it …
Tag: sql
what is the best way to join records of multiple dimension tables that are all connected by a common fact table
So I have a fact table that connects multiple dimension tables. Say for dimension tables I have customer, product, and date. Customer has id, name Product has id, price Date has id, year Fact table …
Joining rows and columns in SQL
Current Result: ID | Item | Red | Green | Blue | Yellow 03 balloon 1 0 0 0 03 balloon 0 1 0 0 03 balloon 1 0 0 1 24 ribbon …
Search function stored procedure with multiple fields not returning expected results
I have a simple table with 4 rows as follows: | person_ID | FirstName | LastName | Phone | Email | +———–+———–+———-+————+———————–+ | 1 …
How to convert date integer keys into datetime in SQL
after a lot of struggle, I cannot convert datekey (20200430) and timekey (103500) into proper datetime (2020-04-30 10:35:00). I do not have an option of joining on date dimension, the numbers must be …
How to keep only one entry among several in PostgreSQL database
I have a database that monitors a network (snapshots table, that contains a snapshot_date column). This production database was flooded by a faulty crontab, resulting in many snapshots for the same device every day. I don’t won’t to remove everything, but i want to keep only one snapshot per snaps…
Get items that have less available quantity then needed
I have a list of order items and a list of inventory quantity per item I want to get the first of each item that I will not have enough inventory This is the list of order items OrderId Item …
Select rows where array contains one of several values in bigquery (ideally with dbplyr)
I have a large set of tweets on bigquery and now want to filter those that contain at least one of a list of hashtags. The hashtags are saved in an array column (uploaded from a list column in R). How can I select rows that contain one of multiple values in any place in that array? Below the code
Row for each date from start date to end date
What I’m trying to do is take a record that looks like this: and change it to look like this: it can be done in Python but I am not sure if it is possible with SQL Oracle? I am having difficult time making this work. Any help would be appreciated. Thanks Answer connect by level is useful for these
Calculating average with biginteger time intervals using TimescaleDB
I have a schema with the following fields: Name of row | Type ————————–+——– name | string value1 | numeric …