1

I have JSON value in column :

INSERT INTO `bt_product` (`_Price`) VALUES
('{\"245\":\"10\",\"366\":\"5\",\"688\":\"1\"}'),
('{\"26\":\"1\"}'),
('{\"32\":\"1\"}'),
('{\"52\":\"1\"}'),
('{\"42\":\"1\"}'),
('{\"58\":\"1\"}'),
('{\"52\":\"1\"}'),
('{\"48\":\"1\"}'),
('{\"32\":\"1\"}'),
('{\"442\":\"10\",\"494\":\"5\",\"520\":\"1\"}'),
('{\"270\":\"10\",\"302\":\"5\",\"318\":\"1\"}'),
('{\"187\":\"10\",\"209\":\"5\",\"220\":\"1\"}'),
('{\"461\":\"10\",\"515\":\"5\",\"542\":\"1\"}'),
('{\"456\":\"10\",\"509\":\"5\",\"536\":\"1\"}'),
('{\"394\":\"10\",\"441\":\"5\",\"464\":\"1\"}'),
('{\"417\":\"10\",\"466\":\"5\",\"490\":\"1\"}'),
('{\"146\":\"10\",\"163\":\"5\",\"172\":\"1\"}'),
('{\"146\":\"10\",\"163\":\"5\",\"172\":\"1\"}'),
('{\"102\":\"10\",\"114\":\"5\",\"120\":\"1\"}'),
('{\"248\":\"10\",\"277\":\"5\",\"292\":\"1\"}'),
('{\"279\":\"10\",\"312\":\"5\",\"328\":\"1\"}'),
('{\"32\":\"1\"}'),
('{\"22\":\"1\"}'),
('{\"58\":\"1\"}');

I need to get data between Max key and Min key.

  • With the given data - what is the expected output? And what did you try so far? – Abecee Jan 8 at 19:29
  • What is a "key"? Please don't store data in JSON when you need SQL to access it. What you showed should be a few dozen rows in a table. – Rick James Jan 8 at 21:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.