Hyperledger Fabric: Average & Max Price FabCar

0 votes
Hey,

I'm using the fabcar project  (https://github.com/IBM/blockchain-application-using-fabric-java-sdk).

I added a price attribute and I would like to obtain statistics like the average or maximum price of the cars stored.

Is there any Go function to do so?

Thank you very much.
Feb 29 in Blockchain by pablobonet
• 120 points
132 views

Hey, @pablobnet,

You can use GetHistoryForKey() to retrieve all the cars. Then, calculate the average price ciclying on them.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

0 votes
3 answers

Hyperledger fabcar sample fabric error: sendPeersProposal - Promise is rejected: Error: Connect Failed

Open the datasources.json file and replace the grpcs:// with grpc://. This solution worked ...READ MORE

answered Apr 30, 2019 in Blockchain by Reshma
1,353 views
0 votes
1 answer

HyperLedger Fabric and Multichain - difference & different use cases

MULTICHAIN: It is a Permissioned Blockchain. It doesn't implement ...READ MORE

answered Dec 28, 2018 in Blockchain by Omkar
• 69,030 points
1,367 views
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
941 views
+1 vote
2 answers

Challenge while setting up Hyperledger Fabric 1.0 in Ubuntu 16.04

The rocksdb error you're seeing wouldn't be ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points

edited Jun 8 by Sirajul 381 views
+1 vote
1 answer
+15 votes
5 answers
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,670 points
202 views
+1 vote
1 answer