Select rows where date > x AND date < y

I am developing an application and I need to select from 2 timePickers the greatest and smallest date to make a select * from utilizing the dates as conditions. I have this: var select = "SELECT * from inventario where ifechaCompra > "+diarioFec...
more »

2017-07-28 23:07 (1) Answers

Laravel Scout, search with where clausure

I just discovered Laravel Scout and I wanted to make a search with where clausure. The code shown below $notes = Note::search($request->lecturer_search)->where([ ['course_id','=',$course_id], ['course_code_number', '=',...
more »

2017-07-24 16:07 (1) Answers

CakePHP Containable where doesn't work

Somehow the following code doesn't work - it prints all subforums instead of just printing one subforum and the threads of it. Code: (Controller Class): public function view($id) { $subforums = TableRegistry::get('subforums'); $...
more »

2017-06-17 11:06 (1) Answers

Put WHERE clause on Pandas Merge

I have two pandas data frames that I am trying to merge together on three different keys ... kind of. Each data frame has a gender column, and a country_destination column which I want to do the outer join on. One data frame has an age_bucket column ...
more »

2017-06-15 06:06 (1) Answers

How to use - within like '%'% query

I have a table column in SQL 2012 called transitiontime that contains dates and times in the format 2017-02-02 21:00:34.847. I'm trying to query all results within the last 3 months, which I would think would just require me to look for 2017-02, or s...
more »

2017-05-24 16:05 (2) Answers

Haskell filter operation with modulo

I'm trying to use the "filter" from Haskell but I've got stuck. I wanna use the filter and modulo together in one function like this multipleOf7 :: [Int] -> [Int] multipleOf7 x = filter (test) x where test = x mod 7 == 0 I also tried to us...
more »

2017-05-11 11:05 (3) Answers

Referencing ROW_NUMBER() in WHERE

Having a query that results in over 500K results. What I want to do is split these up by 100K results. I created a row number column to help with that, but now that I'm referencing it in my WHERE it will not process the function and keep getting th...
more »

2017-05-01 20:05 (2) Answers

Haskell own instance typeclass

I need to declare my own typeclass but I dont understand why there is the (==). data Egg = Soft | Hard instance Eq Egg where (==) I did not find anything where the (==) is used in an instance, only in a class ...
more »

2017-03-24 14:03 (2) Answers

Efficient repeated numpy.where

I have a code in which I want to check whether pairs of coordinates fall into certain rectangles. However, there are many rectangles and i am not sure how to generalize the following code to many rectangles. I only can do it using eval in a loop but ...
more »

2017-03-22 17:03 (3) Answers

Can I use an or ( || ) in a where clause?

I am trying to extend the Array type, but I only want the functions available if the type is Int or Float. I know I can do this for one type: extension Sequence where Iterator.Element == Int { } But can I do it for multiple types? This is sort of...
more »

2017-02-27 18:02 (1) Answers

SQL query Where Between two input

I am trying to make a search box but I am facing an issue. Here's the query i am using, I am getting the search query from database,But query is not taking the Fiyat(price),meterekare,odasayisi values from database My question is that Why I am unabl...
more »

2017-01-06 22:01 (0) Answers

Where() method in Pandas with other a Pd.Series

I am experimenting with the where() method in pandas. I run the simple example in the documentation page with other being a pd.Series and I got NaNs which I can not explain: The example dataframe is: df = pd.DataFrame(np.arange(10).reshape(-1, 2),...
more »

2017-01-06 11:01 (1) Answers

Python Pandas Concat "WHERE" a Condition is met

How can I "concat" a specific column from many Python Pandas dataframes, WHERE another column in each of the many dataframes meets a certain condition (colloquially termed condition "X" here). In SQL this would be simple using JOIN clause with WHERE...
more »

2016-10-16 02:10 (1) Answers