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
66 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,164 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,000 points
1,068 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
710 views
+1 vote
1 answer
+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,660 points
134 views
+1 vote
1 answer