Categories
Mastering Development

How to make a rigid alternative constraint based on earn value

i want to make a rescheduling model. I have 2 modes in tuple, I declare it using ID, I want to make a constraint if the costprod * duration in present’s mode in day 1-7 <= earn value than choose mode 2. But I think something missing in model. but I didn’t know where is […]

Categories
Database Development

How to speed up SQL Server 2014 Spatial functions

I have some normalized tables with about 1,2M records that I collect in a view in a SQL Server 2014 database. Note that I have simplified the names of the tables and columns. To illustrate I have created this query on the source tables: SELECT geom, dateFrom, dateTo FROM requestsTable INNER JOIN geomTable ON requestsTable.requestId […]

Categories
Mastering Development

count with more than 1 having clause

so i have a case from my previous question how to count with more than 1 having clause mysql assume i have the data dummy like this CREATE TABLE order_star_member ( users_id INT, createdAt DATE, total_price_star_member DECIMAL(10,2) ); INSERT INTO order_star_member VALUES (12,’2019-01-01′,100000), (12,’2019-01-10′,100000), (12,’2019-01-20′,100000), (12,’2019-02-10′,100000), (12,’2019-02-15′,300000), (12,’2019-02-21′,500000), (13,’2019-01-02′,900000), (13,’2019-01-11′,300000), (13,’2019-01-18′,400000), (13,’2019-02-06′,100000), (13,’2019-02-08′,900000), (13,’2019-02-14′,400000), (14,’2019-01-21′,500000), […]