Category "database"

Sql function to remove values from follower table that are common in unfollow table

I want to calculate total followers of a person from follow and unfollow table using SQl. Form of table are as follows Follow table: Unfollow table: My tries:

Find which where clause is the most troublesome

Problem background I am trying to pin down to what condition(s) are causing no records / rows the most, so to allow me to find the root cause of what data in th

How to store thousands of coordinated in one column of mysql

I am creating one table which has one column which supposed to store more than 5-10k coordinates at a time. I have declared it as longtext but while storing it

Many to many relation table field into MongoDB

While doing a many to many relationship in SQL we create a table that will have the ID of the 2 tables that are forming the relationship. Sometimes in that tabl

use python with TDengine database but got bind params error

It's quite simple to insert data into TDengine database but still got errors. use conn.statement("insert info cache_record values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,

Set mongoose schema with changing fields

I want to make a mongoose schema that will append timeseries data. I got the idea for that model after reading this (https://www.mongodb.com/blog/post/schema-de

Which relation in MongoDB is better?

For my whole projects I have relationed my multiple collection as this. User model Name:string, email:string, password:string, vehicles:[{ "vehicleId", "vehi

Prefered results

I am trying to list all DEPARTMENT_IDs with PRODUCT_IDs, first where PRODUCT_COST_STATUS = 1 but there are also data with where PRODUCT_COST_STATUS = 0. I prefe

Question - What is the pearson correlation between average dew point and average temperature? my code:

This is my Code * corr_matrix = np.corrcoef(data['Average dewpoint (°F)']data['Average temperature(°F)']) corr = "corr = " + str(round(corr_matrix[1][0]

Create new productpage when new database entry

How can I create a new page when I enter a new product in my database, or hide the parameter inside a normal /.../ ? In this example I will sell Sandles with th

How should I design my application to handle large amounts of data?

I am building an application for building sports betting models. Basically users can create their own criteria and backtest their models across historical data.

How to connect database to data files in Azure Blob?

This resource states that a Azure SQL database may be attached to a database by using the following command: WITH IDENTITY='SHARED ACCESS SIGNATURE', SECRET =

How do I get a data from one table to another but with calculations?

I have two tables: "Customer" and "Order". The "Customer" table has an attribute called noOfPurchases, and the "Order" table has an attribute called quantity. H

I don't know why the columns swapped in JTable

This question may seem silly to you, but pls help me. My program works, but slighty incorrect. In the image1 you can see the location of the data in the databas

Model create() method is executed twice SOMETIMES and creates duplicated entry for 1:1 relation

I am making a Laravel 5.7 system which has tons of code and models, but the ones in problem are: Order - first created Transport (1:1 Order) - afterwards create

delete a table form a database using laravel command

i need to delete a database table using laravel artisan command . not like this command php artisan migrate:rollback --step=5 i need to create like this route o

Is it possible to use Google drive for shareable data in android apps?

I want to create a simple shareable shoppinglist android app and I wonder, if there's a possibility to use Google drive as "db". Technically it should work righ

How to bring data frame into single column from multiple columns in python

I have data format in these multiple columns. So I want to bring all 4 columns of data into a single column. YEAR Month pcp1 pcp2 pcp3 pcp4 1984

Is it possible to write a comment after a ';' in an SQL query?

In this code: SELECT * FROM Customers ORDER BY CustomerName ASC; -- some comment If a comment is not part of the query/code, why can't I write it after the ';'

How to use multiple databases in Django with an empty 'default'?

I'm trying to make a multiple database project in Django. But I'm having problems to properly migrate my models to the appropriate database. I'm using the 'Writ